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

// Note: "denominator" is not the best term for
// me to have used, but I've stuck with it here.

#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 MULT = 1.0e2;
  float denom, divis;

  cout << "\nFor computing 2*100.0 + denom/divis,\n"
       << "please enter the denominator and divisor: ";
  cin >> denom >> divis;

  doComps(MULT, denom, divis);

  return 0;
}

// function definitions

void doComps(float MULT, float denom, float divis)
{
  int intResult;
  intResult =2*MULT + denom/divis;
  printResult(intResult);
}

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

/* Input and output of running program:

For computing 2*100.0 + denom/divis,
please enter the denominator and divisor: 1000.0 10.0

The integer value of the result is: 300
*/