// Adds two integer numbers that are input from keyboard.
#include <iostream>
#include <cstdlib>

int main(int argc, char *argv[])
{
  using namespace std;

  if(argc == 1) {
    cout << "Usage: add <number1> <number2>" << endl;
    return 0;
  }

  if(argc != 3) {
     cout << "Wrong number of parameters." << endl;
     return 1;
  }

  // get the parameters and convert them into integers
  int a = atoi(argv[1]); // first  param.
  int b = atoi(argv[2]); // second param.

  cout << "The sum is " << a + b << endl;

  return 0;
}
