• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu

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...34Next >
Hot today
Error in python
5 Votes
Why Sololearn Removed Our Saved Private Project (Codes), I Can't Find This Option.
2 Votes
Model Context Protocol ? What is it ?
3 Votes
Do you Think Sololearn should add GDscript?
2 Votes
How to get messages?
2 Votes
Where have they gone
1 Votes
what is wrong with my code?
0 Votes
Certificate
0 Votes
PYTHON
1 Votes
how to be good at coding
1 Votes