Answer to Question #22314 in C++ for multazim

Question #22314
write a c++program that accept two numbers and displayt their sum,product,and average.
1
Expert's answer
2013-01-23T09:01:22-0500
#include <iostream>
using namespace std;

int n, m;

void main(){

cout<<"enter the first number: ";
cin>>n;
cout<<"enter the second number: ";
cin>>m;

cout<<"sum: "<<m+n<<"\nproduct: "<<m*n<<"\naverage: "<<(m+n)/2.0<<"\n";

system("pause");
}

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 the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS