// intDivision.cpp
// Demonstrates integer division.

#include <iostream>

using namespace std;

int main()
{
   // Announce purpose of program:
   cout << "This program demonstrates integer division." << endl;

   // Input dividend and divisor from user:
   cout << "Enter dividend:>";
   int dividend;      // to be input from user
   cin >> dividend;
   cout << "Enter divisor:>";
   int divisor;       // to be input from user
   cin >> divisor;

   // Compute integer quotient of user inputs:
   int quotient = dividend / divisor;

   // Compute remainder of integer division:
   int remainder = dividend % divisor;

   // Echo input, and output results:
   cout << dividend << " divided by " << divisor << " is "
                    << quotient << " with a remainder of "
                    << remainder << "." << endl;

   return 0;
}  // function main