/* A solution to COM1100 Quiz #3 (code Rxb6)
 * by Professor Futrelle, 10/22/2000
 */

#include <iostream>
using namespace std;

// function prototypes; adding parameter names not necessary

void doComps(float MULT, float denom, float divis);
void printResult(int result);

int main()
{
  const float DIV = 4; // converted to real on assignment
  float addend, mult;

  cout << "\nFor computing (multiplier/DIV) / (5 + addend) \n"
       << "please enter the addend and multiplier: ";
  cin >> addend >> mult;

  doComps(DIV, addend, mult);

  return 0;
}

// function definitions

void doComps(float DIV, float addend, float mult)
{
  int intResult;
  intResult = (mult/DIV) / (5 + addend);
  printResult(intResult);
}

void printResult(int result)
{
  cout << "\nThe integer value of the result is: " << result << "\n\n";
}

/* This is the interaction with the user, including the two input values:

For computing (multiplier/DIV) / (5 + addend)
please enter the addend and multiplier: 20.0 1000.0

The integer value of the result is: 10

*/