c programming questions on switch case code example
Example: “switch case c” Code Answer
include <stdio.h>
int main() {
int n;
printf(" enter number between 1 to 3");
scanf("%d", &n);
switch (n) {
case 1:
printf("\n one");
break;
case 2:
printf("\n two");
break;
case 3:
printf("\n three");
break;
default:
printf("\n wrong number");
}
return 0;
}