#include /* Example program provided by Dr. Christie Ezeife */ /* The simple program finds the sum of any two given integer numbers using one function with only call-by-value parameters. */ /* I declare the function prototype here */ int FindSum(int, int); int main(void) { int Num1, Num2, Sum; printf("Type the two numbers to add: e.g. 45 20 \t:"); scanf("%d %d", &Num1, &Num2); /* Here, I should call the function FindSum to get the Sum */ /* Note the function returns an int value and has actual */ /* parameters Num1 and Num2. */ Sum = FindSum(Num1, Num2); printf("%d + %d = %d \n", Num1, Num2, Sum); return 0; } /* end of Main */ /* Now, I should define the function FindSum specifying its */ /* formal parameters, which are integers N1 and N2 */ int FindSum(int N1, int N2) { /* I can declare needed local variables here like sum */ int sum; sum = N1 + N2; return (sum); } /* end of function definition for FindSum */