
#include <iostream.h>

// Lethal Dose Programming Problem
// Input: lethal dose of sweetener for a lab mouse, weights of mouse
// and dieter, and concentration of sweetner in a soda.
// Output:  lethal dose of soda.

// Assumption (REQUIRED): 
// Lethal dose is proportional to weight of subject (mouse or friend).

const double concentration = .001; // 1/10 of 1 percent
const double can_weight = 350;     // grams or milliliters
const double grams_sweetner_per_can 
                       = can_weight * concentration; // grams/can

int main()
{
  double lethal_dose_mouse; 
  double lethal_dose_dieter; 
  double weight_mouse;
  double weight_dieter;  // all grams ... 
  double cans;

  cout << "Enter the weight of the mouse in grams" << endl; 
  cin  >> weight_mouse;
  cout << "Enter the lethal dose for the mouse in grams " << endl;
  cin  >> lethal_dose_mouse; 
  cout << "Enter the desired weight of the dieter, in grams " << endl;
  cin  >> weight_dieter;
  
  lethal_dose_dieter = lethal_dose_mouse * weight_dieter/weight_mouse;
  
  
  cout << "For these parameters:\nmouse weight: " << weight_mouse 
       << " grams " << endl
       <<  "lethal dose for the mouse: " << lethal_dose_mouse 
       << "grams" << endl
       << "Dieter weight: " << weight_dieter << " grams " << endl
       << "The lethal dose in grams of sweetner is: " 
       << lethal_dose_dieter << endl;
  
  cans = lethal_dose_dieter / grams_sweetner_per_can; // cans
  cout << "Lethal number of cans of pop: " << cans << endl << endl;

  return 0;
}  
