// arithmetic.cpp
//  This calculates quotients and remainders of various numeric
//  data types to illustrate the differences

#include <iostream>   


using namespace std;

// Constants of numerators and denominators of various types

const int TOP = 8;
const int BOTTOM1 = 3;
const int BOTTOM2 = 4;
const float QTOP = 8.0;
const float QBOTTOM = 3.0;

// Variables to hold the quotients and remainders of various types

int quotient;
int remain;
float qquotient;

int main()
{

  quotient = TOP/BOTTOM1;
  remain = TOP%BOTTOM1;

  cout << "The integral quotient of 8/3 is " << quotient << endl;
  cout << "The remainder of 8/3 (that is 8mod3) is " << remain << endl << endl;

  quotient = TOP/BOTTOM2;
  remain = TOP%BOTTOM2;

  cout << "The integral quotient of 8/4 is " << quotient << endl;
  cout << "The remainder of 8/4 (that is 8mod4) is " << remain << endl << endl;

  qquotient = QTOP/QBOTTOM;

  cout << "The rational quotient of 8/3 is " << qquotient << endl;


  return 0;
}
