68 760
Assignments Done
Successfully Done
In January 2019

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
#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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions