/*
|------------------------------------------------------------------------------|
|      My first C++ program                                                    |  
|      Programmer:  Goofy                                                      |
|      Date:        1999-08-23                                                 |
|      Description: This program can add and subtract two integer numbers      |
|------------------------------------------------------------------------------|
*/

#include <iostream.h>                     // define input and output functions

void main()                               // define main program
{
   int a, b, sum, difference;             // define four integer variables.
   cout << "My first C++ program\n\n";    // output text. "\n" means new line.

   cout << "Input first number: ";        // ask the user for the first number.
   cin >> a;                              // read the first number.

   cout << "\nInput second number: ";     // ask the user for the second number.
   cin >> b;                              // read the second number.

   sum = a + b;  difference = a - b;      // calculate sum and difference.

   cout << "\nThe sum is " << sum;        // output sum.
   cout << "  The difference is " << difference;  // output difference.

   cout << "\n\nEnter any number to exit:";       // tell user how to get out. 
   cin >> a;                              // wait for input before exit.
}                                         // end of main. exit.

