64 484
Assignments Done
99,1%
Successfully Done
In September 2018

Answer to Question #17534 in C++ for ivan

Question #17534
write a program which computes and prints the following;
(i) Product
(ii) Sum
(iii) Difference
(iv)Modules
(v) maximum
(Vi) Minimum
use variable of your own choice
Expert's answer
#include<iostream>
#include<conio.h>

using namespace std;

int main ()
{
intfirst, second;
cout<< "Enter first number: " << endl;
cin>> first;
cout<< "Enter second number: " << endl;
cin>> second;
cout<< endl;

cout<< "Product: " << first*second << endl;
cout<< "Sum: " << first+second << endl;
cout<< "Difference: " << first-second << endl;
cout<< "Modules: " << first%second << endl;

if(first > second) {
cout<< "Max: " << first << endl;
}else cout << "Max: " << second << endl;

if(first < second) {
cout<< "Min: " << first << endl;
}else cout << "Min: " << second << endl;

cout<< endl;
system("pause");

return0;

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions