Program to use switch control statement in C Language
#include<stdio.h>
int main()
{
int choice;
printf("Enter your choice : ");
scanf("%d",&choice);
switch(choice)
{
case 1:
{
printf("first\n");
break;
}
case 2:
{
printf("second\n");
break;
}
case 3:
{
printf("third\n");
break;
}
default:
{
printf("woring choice\n");
}
}
return 0;
}
Output
Enter your choice : 3
third