For example, if I made a simple switch-case how would I make the console app close depending on the input? I don't want to use to use break; and skip the loop, I want to close the console altogether.
char choice;
printf("Run random function \n");
printf("Exit \n");
choice = getchar();
fflush(stdin);
switch(choice)
{
case '1':
//randomFunction();
case '2':
//I want this case to exit the console the console
}