Discussions Q&R
Please explain.
0 Vote
2 RéponsesBool function problem
1 Vote
1 RéponseWhen I enter two numbers the sum is displayed.. but when I input character as yes not y... Then it goes into an infinite loop... can anyone explain why?
int a,b;
char ch;
do
{
cout<<"Enter two numbers: ";
cin>>a>>b;
cout<<"The sum is "<<a+b
<<"\nDo you want to try again (y/n): ";
cin>>ch;
}while(ch=='Y'||ch=='y');
0 Vote
4 RéponsesWhen I enter two numbers the sum comes.. but when I input character as yes not y... Then it goes into an infinite loop... can anyone explain why?
int a,b;
char ch;
do
{
cout<<"Enter two numbers: ";
cin>>a>>b;
cout<<"The sum is "<<a+b
<<"\nDo you want to try again (y/n): ";
cin>>ch;
}while(ch=='Y'||ch=='y');
0 Vote
2 RéponsesWhy not working
-4 Votes
4 RéponsesAujourd'hui en vedette
Please recommend me
0 Votes
Can i code here? Or just learn?
0 Votes
How to build an AI website ?
1 Votes
It's app not running properly?
1 Votes
Why Lazy?
1 Votes