Can anyone present the code in c language for exit and continuation of a program choice in switch case. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can anyone present the code in c language for exit and continuation of a program choice in switch case.

Suppose no of choices are provided for various operations. I need after certain choice of statements and its execution again the same statement for providing choice for operation must be print. And at last if we does not need the continuation of the program last choice will be the exit.

20th Oct 2018, 10:24 AM
Deepika Behera
Deepika Behera - avatar
2 Answers
+ 9
For the continuation(considering repetition) of a program you need to put the switch statement in a loop. And do as Taste implemented.
20th Oct 2018, 10:49 AM
blACk sh4d0w
blACk sh4d0w - avatar
+ 2
const int EXIT = 100; int main(){ ... ... switch(x){ ... case EXIT: return 0; }
20th Oct 2018, 10:30 AM
Taste
Taste - avatar