Обсуждения
When 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 голосов
4 ответовWhat's wrong?! Please! Help me!!
2 голосов
13 ответовWhy it isn't working?
0 голосов
1 ответMatrix I need help java
0 голосов
2 ответовWrite a python program which will ask user to enter 3 numbers. Your program will output the sum and average of these 3numbers.your program will also output the largest number, the smallest number of these three. For exampleif user enter 2,10,3 than your program will output,
For number 2,10,3 sum is 15,average is 5,the largest number is 10 and the smallest number is 2.
-1 голос
4 ответовWhen 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 голосов
2 ответовC++ for loop+break question
2 голосов
2 ответовАктуальное сегодня
New code
1 Votes
How would you solve the part of the C# Intermediate code project that requires operator overloading?
0 Votes
Kernel in Jupyter
2 Votes
JAVA PROGRAMMING
1 Votes
SQL
0 Votes