• 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
Python stressed me out
1 Votes
How often can you become a fully stuck developer?
1 Votes
Improve accessibility of this page
0 Votes
Course Doubt
1 Votes
If we already have the DELETE command in SQL, why do we need TRUNCATE?
2 Votes
What is a simple and easy way to learn ruby? :)
0 Votes
Lesson Takeaways
0 Votes
Data analysis
0 Votes
Saved code
0 Votes
How do i make a lexer and parser
1 Votes