/*
File name: hw2.cpp
Author: Bo Bayles
E-mail address: bmb3h6@umr.edu
Description: This program calculates hat size, waist size, and jacket 
size based on user input and constants.
*/

#include <iostream>
using namespace std;
//Include library for cin and cout with standard namespace.

int main()
//Begin program execution.
{
  int height, age;
  /*
  Declare height and age as int variables, to be initialized by user
  and used later in calculation.
  */
  
  float weight, hatSize, jacketSize, waistSize;
  /*
  Declare weight as a float, since it will be used in division later.
  If it were an int, I'd lose precision after division. It will be
  initialized by the user. hatSize, jacketSize, and waistSize are
  declared as float variables to keep precision to match expected
  output. They will be initialized after the calculations are done to
  the user inputs.
  */

  cout << "Enter height (in inches): ";
  cin >> height;
  /*
  Prompt user for input, and store it in the height variable, thus
  initializing it.
  */
  
  cout << "Enter weight (in pounds): ";
  cin >> weight;
  /*
  Prompt user for input, and store it in the weight variable, thus
  initializing it.
  */
  
  cout << "Enter age (in years): ";
  cin >> age;
  /*
  Prompt user for input, and store it in the age variable, thus
  initializing it.
  */

  hatSize = (weight / height) * 2.9;
  /*
  Calculate hat size: Dividing the float, weight, by the int, height
  first. The result, since they don't match types, will be a double.
  Multiply that result by the constant 2.9 and store that result in
  the hatSize variable.
  */

  cout << "\n Your hat size is: ";
  cout << hatSize;
  //Output a new line, then the value stored in the hatSize variable.

  jacketSize = (height * weight) / 288;
  /*
  Calculate jacket size: Multiply the int, height, by the float weight
  first. Divide that result by the constant 288, and store that result
  in the jacketSize variable.
  */

  cout << "\n Your jacket size is: ";
  cout << jacketSize;
  /*
  Output a new line, and then the value stored in the jacketSize
  variable.
  */

  waistSize = (weight / 5.7);
  /*
  Calculate waist size: Divide the float variable weight by 5.7, and
  store the result in the waistSize variable.
  */

  cout << "\n Your waist size is: ";
  cout << waistSize;
  /*
  Output a new line, and then the value stored in the waistSize
  variable.
  */

  return(0);
  //Exit normally.
}

