Answers for "“switch case c” Code Answer"

C
-1

“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;
}
Posted by: Guest on November-30-2020

Code answers related to "“switch case c” Code Answer"

Code answers related to "C"

Browse Popular Code Answers by Language