how to non break out from this program when c) is pressed ?
#include <stdio.h>
int main(void) {
char choice;
printf("Who invented telephone :\n");
printf("a) Alexander Bell ?\n");
printf("b) Denzel Uashington ?\n");
printf("c) Help !\n");
scanf("%c", &choice);
switch (choice)
{
case'a':
printf("Right answer.\n");
break;
case 'b':
{
printf("Wrong answer.\n");
break;
case 'c':
printf("I think is case a.\n");
break;
}
default:
printf("Wrong button.\n");
break;
}
getchar();
return 0;
}
|