Answer :

switch is used switch between different choices..
For eg :
printf("1 : ADD 2: SUB 3:DIVIDE 4: EXIT\n");
printf("Enter your choice\n");
scanf("%d",&choice)
switch(choice)
{
case 1: 
           // code for adding
           

case 2:
          // code for subtracting
case  3:
          // code for dividing
case 4:
         // code to exit from this loop
}

This is a sample code.. Not full
Please find your answer in .txt uploaded file.
View image maynkjha

Other Questions