Commit d2a13e80 authored by Martin, Daniel (UMSL-Student)'s avatar Martin, Daniel (UMSL-Student)
Browse files

Update hw1.cpp equations

parent d6bf4d7e
......@@ -37,8 +37,9 @@ int main()
lunch_money *= include_SELM;
//Formula for lbs of sugar to keep gamblers going
//lbs sugar = #people * (avgWeight * (avgSugarConsumption/gut feeling)+SELM)
divison = static_cast<float>(AVG_SUGAR_CONSUMED)/GUT_FEELING;
lbs_sugar = num_people * (avg_weight * (division)+lunch_money);
lbs_sugar = num_people * (avg_weight * (static_cast<float>(AVG_SUGAR_CONSUMED)
/GUT_FEELING)+(lunch_money*(num_people>5));
//Calculate duff soda equivalent (3 lbs sugar / duff soda"
num_duff_sodas = static_cast<int>(lbs_sugar) / 3;
//Print results
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment