Q&A Discussies
Tic-Tac-Toe Java Two Players
0 Stemmen
1 AntwoordPlease explain.
0 Stemmen
2 AntwoordenBool function problem
1 Stem
1 AntwoordWhen 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 AntwoordenWhy this code has no output?
0 Stemmen
1 AntwoordWhen 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 Stemmen
2 AntwoordenWhy not working
-4 Stemmen
4 AntwoordenPopulair vandaag
Python stressed me out
1 Votes
Course Doubt
1 Votes
Data analysis
0 Votes
Help
0 Votes
How do i make a lexer and parser
1 Votes
Saved code
0 Votes