Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how do i exit a do while statement with a switch?

+1 vote
asked Sep 25, 2017 by anonymous

2 Answers

0 votes
answered Sep 25, 2017 by anonymous
do{
     switch(thing){
     case 1:
          break;
     }
}while(1);
commented Sep 28, 2017 by anonymous
galat h saale
0 votes
answered Sep 26, 2017 by nick
#include <stdio.h>

int main()
{
    int flag = 1;
    int item = 1;
    do {
        switch(item){
            case 1: flag = 0; break;
        }
    } while(flag);

    return 0;
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...