Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урокОбсуждения
why is setInterval doing a loop?
0 голосов
2 ответовgoto statement problem!
2 голосов
4 ответовCODING CHALLENGE (...or maybe not!)
13 голосов
5 ответовHow to clear canvas (THREE.js)
2 голосов
6 ответов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 ответов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');
0 голосов
2 ответовАктуальное сегодня
How to reverse a word?
3 Votes
Help!
0 Votes
Ayudenme con el error
1 Votes
How can I activate my profile???
0 Votes
Beginner
1 Votes
Can't fill gaps after app update
2 Votes