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.
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.
+ 2
const int EXIT = 100;
int main(){
...
...
switch(x){
...
case EXIT:
return 0;
}