/***************************************************
Special Remainder

Write a program that reads in two integers from the
user, and prints out the remainder when the larger
is divided by the smaller.

This requires the famous swap!  This technique will
be well-used by any programmer!
***************************************************/
#include <iostream>
using namespace std;

int main()
{
  // read numbers
  int a, b;
  cout << "Enter two integers: ";
  cin >> a >> b;

  // make sure a is the larger, b is the smaller
  if (a < b)
  {
    int t;
    t = a;
    a = b;
    b = t;
  }

  // print remainder
  cout << "The remainder when " << a
       << " is divided by " << b << " is "
       << a % b << endl;

  return 0;
}