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
What is a web browser intension?
1 Votes
Mentors
1 Votes
Thread local : global vs local
0 Votes
python
0 Votes
Postgrrsql and python
0 Votes
Codding lern
0 Votes
Data Analysis Course
1 Votes
Is there LUA?
0 Votes