67 007
Assignments Done
99,2%
Successfully Done
In November 2018

Answer to Question #69475 in C++ for ,Kelvin

Question #69475
C++ program with a function that takes two int parameters, adds them together, then returns the sum. The program should ask the user for two numbers, then call the function with the numbers as arguments, and tell the user the sum.
Expert's answer
Answer:
#include <iostream>

using namespace std;

int a,b;

int sum(int a, int b){
return a+b;
}

int main(){
cout << "Please, enter two numbers" << endl;
cin >> a >> b;
cout << sum(a,b);
}

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