Answer to Question #3309 in C++ for mukunda
Write a program to calculate the sum of two numbers using functions.
1
2011-07-06T05:38:31-0400
#include <iostream>
using namespace std;
int calculate_sum (int number1, int number2)
{
return number1 + number2;
}
int main()
{
int number1 = 130;
int number2 = 182;
int sum = calculate_sum (number1, number2);
cout << "The sum is " << sum << endl;
return 0;
}
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment