/* testfunc03.cpp CIS 150 6/9/2005 David Klick This program demonstrates how to create and call a function that has multiple arguments and a return value. */ #include #include using std::cout; using std::cin; int sum(int x, int y); // function prototype int main(void) { int num1, num2; cout << "Enter two integers: "; cin >> num1 >> num2; cout << "The sum of the two integers is " << sum(num1, num2) << '\n'; return 0; } /* This function adds two integers and returns the result. */ int sum(int a, int b) { return a+b; }