do while loop [ not working this code in online compiler]

 /******************************************************************************


Welcome to GDB Online.

GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, 

C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS

Code, Compile, Run and Debug online from anywhere in world.


*******************************************************************************/

#include <stdio.h>


int main()

{char ch;

do{ printf ("welcome\n");

     printf ("1 - english\n");

      printf ("2 - hindi\n");

       printf ("3- science\n");

        printf ("enter q or Q to exist\n");

        ch = getch();

}while( ( ch!= 'q' && ch !='Q' ));

    printf(" thank you for visiting");


    return 0;

}


Comments

Popular posts from this blog

Factors : using C

Cross shaped pattern

Factorial ! calculation