// Programmer: Clayton Price date: 2/6/17
// File: hw2.cpp
// Purpose: This file contains the main function for the program that will
// compute the number of pills Milhouse should take for his allergies.
#include <iostream>
using namespace std;
int main()
{
/* ---------------- DECLARATIONS --------------- */
const float SOYMILK_ALERGEN = 1.9; //the effect of soymilk
const float TAT_POISONING_FACTOR = 3.5; //the effect of tattoos
short num_pills = 0; //output var
short num_classes_studied; //input vars
short num_hours_video;
float soy_milk;
bool tatOrNot = false;
/* --------------- GREETINGS AND READ INPUTS ---- */
cout<<"\n\n\nWelcome to the Pill-fer-er"<<endl<<endl;
cout<<"Please enter the following info....."<<endl;
cout<<"\tHow many classes did you study for: ";
cin>>num_classes_studied;
cout<<"\tHow many hours did you videofy? ";
cin>>num_hours_video;
cout<<"\tHow many cups of soymilk did you consume: ";
cin>>soy_milk;
cout<<"\tDid you get a tattoo(1 - yes, 0 - no)? ";
cin>>tatOrNot;
/* --------------- COMPUTATIONS AND OUTPUT ---------- */
num_pills = static_cast<int>(((static_cast<float>(num_classes_studied)/
num_hours_video) + soy_milk * SOYMILK_ALERGEN)
+ tatOrNot * TAT_POISONING_FACTOR);
cout<<"\n\nSooo, given the information you have entered:"<<endl;
cout<<"The number of pills you need today is "<<num_pills<<" pills"
<<endl;
cout<<"\n\t\tEnjoy your pharma dinner!!"<<endl<<endl;
return 0;
}