1) Display the message, \" Welcometo C++\"; 2) Prompt the userto enter 2 integer
ID: 3616983 • Letter: 1
Question
1) Display the message, "Welcometo C++";
2) Prompt the userto enter 2 integer numbers;
3) Calculate anddisplay the sum, product, difference, and quotient of the 2numbers,
and identify each result;
4) Repeat the item 2 and 3 sequence a total of five (5) times;
This is my program:
#include <iostream>
using namespace std;
int main()
{
cout<<"Welcome to C++ ";
int x,y,Add,Multiply,Subtract,Remainder;
float Divide;
while(5)
{
cout<<"Enter 1st int then press return:";
cin>>x;
cout<<"Enter 2nd int then press return:";
cin>>y;
Add = x+y;
Multiply = x*y;
Subtract = y-x;
Divide = y/x;
Remainder = y%x;
cout<<Add<<" is the sum of theintegers ";
cout<<Subtract<<" is the differenceof the integers ";
cout<<Multiply<<" is the product ofthe integers ";
cout<<Divide<<" is the quotient ofthe integers ";
cout<<Remainder<<" is theremanider ";
}
return 0;
}
Explanation / Answer
please rate - thanks you need a counter to count the number of times through theloop #include using namespace std; int main() { coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.