Courses
Log inStart Learning AI
Courses
Log inStart Learning AI

Q&A Discussions

When 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');
c++
0 Votes
2 Answers
10th Oct 2016, 1:14 PM
Soutik
Soutik - avatar
< Previous1...67Next >
Hot today
What kind of questions do companies ask in Data Analyst interviews (including Python, SQL, Power BI, and Excel)?
2 Votes
??
1 Votes
Give some simple practice questions in C
0 Votes
ĐžŃˆĐžĐ±Đșа ĐČ ĐżŃ€ĐžĐ»ĐŸĐ¶Đ”ĐœĐžĐž Sololearn
1 Votes
Hello guys,
1 Votes
Did sololearn helped you to get easier a job?
1 Votes
How many time I can use sololearn trial mode?
1 Votes
Help me
1 Votes
NEO V2.0
1 Votes
Programming
0 Votes