• Kursy
  • Kompilator kodu
  • Dyskusja
  • Cennik
  • Zespoły
Menu

Dyskusje Q&A

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 głosów
2 odpowiedzi
10th Oct 2016, 1:14 PM
Soutik
Soutik - avatar
< Do tyłu1...34Dalej >
Popularne dzisiaj
My codebits section is full of deleted codes
13 Votes
Ai generated practices
2 Votes
Solving coding challenges
0 Votes
Feedback on my portfolio
0 Votes
Yo this is madness
0 Votes
Advertising in Sololearn
0 Votes
How can i insert files?
1 Votes
Hi who can hel me please
0 Votes
Changing String Variables into int in C++
0 Votes
I am new
0 Votes