• Cours
  • Compilateur de code
  • Discuter
  • Tarification
  • Équipes
Menu

Discussions Q&R

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 Vote
2 Réponses
10th Oct 2016, 1:14 PM
Soutik
Soutik - avatar
< Précédent1...34Suivant >
Aujourd'hui en vedette
How do you make Event listeners Minecraft Spigot plugin development
0 Votes
Inner .html
0 Votes
Lesson on Robotics
1 Votes
Tic tak toe
1 Votes
Hyperlink and tests
0 Votes
About this app
1 Votes
Kamal Hinduja Switzerland : How long does it typically take to complete a course on Solo Learn?
0 Votes
Ha
0 Votes
How to Claim it
0 Votes
Mazen
0 Votes