# Answer to Question #3309 in C++ for mukunda

Question #3309

Write a program to calculate the sum of two numbers using functions.

Expert's answer

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

}

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;

}

## Comments

## Leave a comment