subject

Generally speaking, on average it takes you 3500 calories each day to maintain your weight, while 3500 extra calories generally equals 1 pound of weight gain (So, 7000 calories in one day would mean that you gained 1 pound that day). Prompt for 7 days of calories consumed by day, starting with Sunday and going through Saturday and put the calories into an array. Print the array along with a nicely formatted header (printf is a requirement for this part of the program).
Write a method to calculate the total amount of calories consumed for the week and print the information in a nice readable format.
Write a method to calculate the average number of calories consumed in the week to the nearest tenth and print the information in a nice format.
Write a method to find if you gained or lost weight this week. Subtract your ideal calories to maintain your weight (7 * 3500) from the calories you consumed for the week. Did you gain or lose weight this week and by how many pounds to the nearest tenth of a pound? Print the information in a nice format.
Use the following test input to ensure your program is running properly:
Sunday – 4700 calories
Monday – 2500 calories
Tuesday – 2000 calories
Wednesday – 1800 calories
Thursday – 3000 calories
Friday – 1500 calories
Saturday – 3500 calories

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:30, jayjay5246
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, lopez7512
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
image
Computers and Technology, 24.06.2019 02:00, ishmael9332
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
Answers: 1
image
Computers and Technology, 25.06.2019 02:30, corinnerodriguez2001
How to delete a question in
Answers: 2
You know the right answer?
Generally speaking, on average it takes you 3500 calories each day to maintain your weight, while 35...

Questions in other subjects:

Konu
Mathematics, 03.12.2020 22:00