Following code: The instance it hits the scanf statement for my character value/type all hell breaks loose program instantly shuts down, no error codes, no nothing. I feel like I'm loosing it. I cannot seem to figure out what the issue could be, I don't have any random break statements or anything that should shut down the code. PLEASE HELP
#include <stdio.h>
int main() {
    
    char type;
    int value=0;
    printf("Enter Shape Choice: 1 Inverted triangle, 2 Square, 3 Slope, 4 Diamond with Marked Edges\n");
    scanf_s("%d", &value);
    printf("Enter Charachter to draw with:\n");
    scanf_s("%c", &type);
        int count = 0;
        int count2 = 0;
        int firstcounter = 0;
        int value2 = 0;
        if (value == 1) {
            printf("please enter how many lines you would like:");
            scanf_s("%d", &value2);
        }
    switch (value) {
        case(1):
            while (firstcounter <= value2) {
                for (int i = value2; i > firstcounter; i--) {
                    printf("*");
                }
                printf("\n");
                firstcounter++;
            }
            break;
        case(2):
            for (int i = 0; i < 5; i++) {
                for (int j = 0; j < 5; j++) {
                    printf("%c", type);
                }
                printf("\n");
            }
            ;
            break;
        case(3):
            for (int i = 0; i < 5; i++) {
                count2 = 5;
                while (count2 > i) {
                    printf(" ");
                    count2--;
                }
                count = 0;
                printf("%c", type);
                while (count <= i - 1) {
                    printf("*");
                    count++;
                }
                printf("\n");
            }
            ;
            break;
        case(4):
            printf("    %c", type);
            int seccount = 1;
            for (int i = 0; i <= 4; i++) {
                int firstcount = 1;
                int thirdcount = 10;
                printf("\n");
                if (i < 3) {
                    for (int k = 3; k > i; k--) {
                        printf(" ");
                    }
                    printf("%c", type);
                    while (firstcount <= seccount) {
                        printf("*");
                        firstcount++;;
                    }
                    printf("%c", type);
                    seccount = seccount + 2;
                }
                if (i >= 3) {
                    for (int k = 1; k < i; k++) {
                        printf(" ");
                    }
                    printf("%c", type);
                    while (thirdcount > seccount) {
                        printf("*");
                        thirdcount--;
                    }
                    seccount = seccount + 2;
                    printf("%c", type);
                }
            }
            printf("\n    %c", type);
            ;
            break;
        }
}
        
        
    
        
    
 
    