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.
1
Expert's answer
2017-08-08T06:51:10-0400
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); }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment