

    #include <stdio.h>

    /* global definition of a function prototype */
    /* known to all functions                    */
    int add_two (int, int);
    int double_it (int);

    int main ()
    {

      int doubled;  /* the result of a number doubled */
      int sum;      /* the sum of two numbers         */
      int val;      /* just a number to work with     */

      val = 100;

      /* call the functions */
      /* The function prototypes before help the compiler to             */
      /* determine the types each function is passed and what it returns */
      sum = add_two (val, val*5);
      doubled = double_it (val);

      printf("sum = %i and doubled = %i\n", sum, doubled);

      return(0);

    }


    // **************************************************
    // Function: add_two
    //
    // Description:  Adds to numbers together and returns
    //               their sum.
    //
    // Parameters: num1 - first integer to sum
    //             num2 - second integer to sum
    //
    // Returns:    result - sum of num1 and num2
    //
    // ***************************************************

    int add_two (int num1, int num2)
    {

       int result;  /* sum of the two number */

       result = num1 + num2;

       return (result);

    }

    // **************************************************
    // Function: double_it
    //
    // Description:  Adds to numbers together and returns
    //               their sum.
    //
    // Parameters: num - number to double
    //
    // Returns:    answer - the value of num doubled
    //
    // ***************************************************
    int double_it (int num)
    {

       int answer; /* num being doubled */

       answer = num + num;

       return (answer);
    }

