Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in c++ How many cans of diet cole can I consume before losing all my weight? :) A government research lab has concluded that an
in c++
How many cans of diet cole can I consume before losing all my weight? :) A government research lab has concluded that an artificial sweetener commonly used in diet soda pop will cause death in laboratory mice. A friend of yours is desperate to lose weight but cannot give up soda pop. Your friend wants to know how much diet soda pop it is possible to drink without dying as a result. Write a program to supply the answer. The input to the program is the amount of artificial sweetener needed to kill a mouse (use 5 grams), the mass of the mouse (use 35 grams), and the weight of the dieter (use 45359.2 grams for a 100 pound person). Assume that the lethal dose for a mouse is proportional to the lethal dose for the human. A single can of soda pop has a mass of 350 grams. To ensure the safety of your friend, be sure the program requests the weight at which the dieter will stop dieting, rather than the deter's current weight. Assume that diet soda contains 1/10th of 1% artifidal sweetener. Use a variable declaration with the modifier const to give a name to this fraction. You may want to express the percent as the float value 0.001f. Use 7 character or less variable names. Use only the size Integer variables required. Use only the float data type where necessary, no doubles. Input the users weight, Output the number of cans of soda the user can consume before he/she hits the expiration quantity Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started