Обсуждения
When I enter two numbers the sum is displayed.. 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');
0 голосов
4 ответовАктуальное сегодня
Python
2 Votes
TICTACTOE
1 Votes
Learn python
2 Votes
Error
0 Votes
BIG DOUBT🤔🤔🤔🤔
2 Votes
Help for study
0 Votes
Need help (French)
1 Votes
Spying on me
1 Votes
Where's PHP and Ruby courses?
1 Votes