#include <stdio.h>
  
int add_values (int number1, int number2)    /* two parameters, number1 and number 2 */

{     /* start of function body */

    int result;  /* local variable to hold add result */
     
    result = number1 + number2;

    return (result);   /* the value contained in result is returned to the calling function, in this case, main */

}     /* end of function body */

int main ( )
{

    int value1;    /* local variable */
    int value2;    /* another local variable */
    int answer;    /* and yet another local variable */

    printf ("\n Enter an integer value: ");
    scanf ("%i", &value1);

    printf ("\n Enter another integer value: ");
    scanf ("%i", &value2);

    answer = add_values (value1, value2);   /* pass two arguments, value1 and value2, to add_values */

    printf ("\n Adding %i to %i equals %i", value1, value2, answer);

    return (0);

}