plz solve this following program. you are required to write a program which should take input from user in the form of charecters A or B .Based upon's input you should use while loop or do/while loop for taking input and if/else conditin for make decision
Looks pretty simple and show us your effort and we will be more than happy to help you get this done.
Code: #include<stdio.h> #include<conio.h> #include<string.h> void main() { int b,c,i; char a; i=0; printf("enter your choice:\nA for while loop or B for do while loop"); scanf("%c",&a); b=strcmp(a,"A"); c=strcmp(a,"B"); if(b==0) { printf("this is A"); i++; while(i!=1) } else if(c==0) { do { printf("this is B"); i++;} while(i!=1); } else { printf("wrong input"); getch(); exit(); } getch(); }