![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 29.10.2020 23:40 Wintersavannah
Java Eclipse Homework Calories
Package : chall12A
Class : Calories
Use a “while loop” in the code to solve the following problem:
Over a 14-day period, calculate the total number of calories that the user consumed.
Use the following information to create the necessary code. You will use a while loop in this code.
1. The following variables will need to be of type “int”:
• day
• calories
• totalCalories
1. Show a title on the screen for the program.
2. Ask the user if they want to run the program.
3. Initialize (give values) to those variables that need starting values.
4. If their answer is a capital or lowercase ‘Y’, do the following:
• Use a while loop to loop through the days.
• Ask the user for the number of calories he/she consumed on each day. Please • include the day number in your question. Example: “How many calories did you consume on day 1?”
Include the calculation to keep a running total of the calories consumed.
1. After 14 days, the code should fall out of the loop. Include a print statement that looks like this: “After 14 days, you consumed calories.” (Of course, the computer will need to fill in the total number.)
2. Include an “else” so that there is an appropriate response if the user decides not to run the program.
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 19:30
When using a public computer or network, you should always
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 22:50
An environmental protection agency study of 12 automobiles revealed a correlation of 0.47 between engine size and emissions. at 0.01 significance level, can we conclude that there is a positive association between the variables? what is the p value? interpret.
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 00:00
Which tool could be used to display only rows containing presidents who served two terms
Answers: 3
You know the right answer?
Java Eclipse Homework Calories
Package : chall12A
Class : Calories
Use a “while l...
Class : Calories
Use a “while l...
Questions
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 13.10.2019 19:30
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 13.10.2019 19:30
![question](/tpl/images/cats/mat.png)
Mathematics, 13.10.2019 19:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 13.10.2019 19:30
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
English, 13.10.2019 19:30
![question](/tpl/images/cats/mat.png)
Mathematics, 13.10.2019 19:30
![question](/tpl/images/cats/mat.png)
Mathematics, 13.10.2019 19:30
![question](/tpl/images/cats/istoriya.png)
History, 13.10.2019 19:30
![question](/tpl/images/cats/biologiya.png)
Biology, 13.10.2019 19:30
![question](/tpl/images/cats/mat.png)
Mathematics, 13.10.2019 19:30
![question](/tpl/images/cats/biologiya.png)
Biology, 13.10.2019 19:30
![question](/tpl/images/cats/mat.png)
Mathematics, 13.10.2019 19:30
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 13.10.2019 19:30