Обсуждения
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 ответовАктуальное сегодня
What's wrong in my code?
4 Votes
App Development
1 Votes
GUI-Based Python code in Webpage
3 Votes
My Missing Courses
1 Votes
Are '\0' and NULL the same?
1 Votes
cyber security
0 Votes
career in cybersecurity
0 Votes
Number addition
0 Votes