F&A Diskussionen
why is setInterval doing a loop?
0 Stimmen
2 Antwortengoto statement problem!
2 Stimmen
4 AntwortenCODING CHALLENGE (...or maybe not!)
13 Stimmen
5 AntwortenHow to clear canvas (THREE.js)
2 Stimmen
6 AntwortenWhen 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 Stimmen
4 AntwortenWhen 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 Stimmen
2 AntwortenHeute heiß
How do we code calculator
2 Votes
How to add comment in python?
1 Votes
I need help
1 Votes
My hearts are disappering :(
0 Votes
Pressure and tension
2 Votes