F&A Diskussionen
J-O-K-E-S-++-C-H-A-T-R-O-O-M
1 Stimme
2 Antwortennew horizons
2 Stimmen
2 AntwortenTest the code
0 Stimmen
2 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 AntwortenThe code shown below in the description runs here when I try it, but when I wrote it on code blocks it gave me 5 errors..
1. expected imitializer before '<' token. (line 19).
2. reference to 'pair' is ambiguous. (line 26).
3. expected primary-expression before double. (line 26).
4. expected ';' before 'double'. (line 26).
5. 'obj' was not declared in this scope. (line 27).
Any help please?
0 Stimmen
5 Antwortenc# try-catch vs trypharse
0 Stimmen
1 AntwortGet Errorno from MaxRetryError
0 Stimmen
1 AntwortWhen 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 would you solve the part of the C# Intermediate code project that requires operator overloading?
0 Votes
Kernel in Jupyter
2 Votes
SQL
2 Votes
JAVA PROGRAMMING
1 Votes