A program with a function Add that takes two parameters and returns their sum, then call the function from the main
#include <iostream>
using namespace std;
// function that takes two parameters and returns their sum
int Add(int a, int b)
{
return a +b;
}
void main()
{
// callfunction Add and print the result
cout<< "5 + 9 = " << Add(5,9);
}