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
Audio adding
1 Votes
playground input
0 Votes
What is problem in this code
0 Votes
Stuck in Quize
1 Votes
Software developer
0 Votes
C Program
0 Votes
TIPS From Veterans
1 Votes
How I can use div
0 Votes