How to create a menu in C program using do/while loops? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to create a menu in C program using do/while loops?

A menu for Decimal to Binary and Octal form and loops!

14th Oct 2021, 4:22 PM
Harley Verunque
1 Answer
+ 2
do{ printf("Menu: "); printdf("\n1. Decimal to binary"); printf("\n2. Decimal to octal"); printf("\nEnter your choice (1 or 2): "); scanf("%d",&ch); /* Code here*/ printf ("\nWant to continue (y/n): "); scanf ("%c",&ch1); }while(ch1=='y' || ch1=='Y');
15th Oct 2021, 2:43 AM
Indira
Indira - avatar