question archive Use a for loop (with range) with an accumulator to calculate a person's weight at the end   of the month for five months assuming that their diet reduces calorie intake by 500 calories per day

Use a for loop (with range) with an accumulator to calculate a person's weight at the end   of the month for five months assuming that their diet reduces calorie intake by 500 calories per day

Subject:Computer SciencePrice: Bought3

Use a for loop (with range) with an accumulator to calculate a person's weight at the end

 

of the month for five months assuming that their diet reduces calorie intake by 500 calories per day.

 

The typical weight loss is four pounds per month. The program should prompt the user to enter their

 

current weight. Use int for the data type and create appropriate prompts for the input statements.

 

Enter 150 pounds for the test data. Copy code and output.

 

Output should be this:

 

What is your starting weight? 150

 

At the end of the month 1 your weight will be 146 lbs.

 

At the end of the month 2 your weight will be 142 lbs.

 

At the end of the month 3 your weight will be 138 lbs.

 

At the end of the month 4 your weight will be 134 lbs.

 

At the end of the month 5 your weight will be 130 lbs.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE