Q&A Discussies
Please help !
0 Stemmen
2 AntwoordenContinuous problem
1 Stem
1 AntwoordPython question
0 Stemmen
1 AntwoordPlease explain.
0 Stemmen
2 AntwoordenNested list in python
0 Stemmen
2 AntwoordenWhen 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 Stemmen
4 AntwoordenDynamic DataType
1 Stem
1 AntwoordCode help
0 Stemmen
1 Antwoord