Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobierenF&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 to cast in python : 2
2 Votes
Bits
5 Votes
Why didn't I get it?
1 Votes
Polyalphabetic Cipher
0 Votes
Adding a photo
1 Votes
This error is showing.
0 Votes