たとえば、単純なスイッチケースを作成した場合、入力に応じてコンソール アプリを閉じるにはどうすればよいでしょうか? ブレークを使用したくありません。ループをスキップして、コンソールを完全に閉じたいと思います。
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
}