The given table on the right lists the Calorie contents of several foods., Running or walking burns off about 100 Calories per mile. Write a C++ program that requests the number of cups, slices, or pieces from the user the number of the foods òn the list consumed. The program should then display the number of miles that must be run or walked to burn off the Calories represented in that food. The program should run as follows: (The user may enter any number for each item in the program. The program will automatically compute the ingested calories and the miles to run)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write a C++ Program

 

 

Thank you

Food Group
Calories
Programming Exercise:
Chocolate milk (1 cup),
208
A The given table on the right lists the Calorie contents of Pizza (cheese)(1 slice)
several foods. Running or walking burns off about 100 Noodles (spaghetti)(1 cup)
Calories per mile. Write a C++ program that requests the
number of cups, slices, or pieces from the user the Apple (1 medium)
number of the foods òn the list consumed. The program
should then display the number of miles that must be run Orange (1)
or walked to burn off the Calories represented in that food. Pineapple (1 cup)
The program should run as follows:
(The user may enter any number for each item in the
program. The program will automatically compute the
ingested calories and the miles to run)
290
159
81
Banana (1)
105
65
Potato (1 large, baked, plain)
220
Biscuit (1)
103
Rice, white (1 cup)
223
Observe that the result
is a floating-point value
for the miles, so you
should use floating-point
arithmetic to compute
the answer for this
problem. This time, use
the compound
assignment += for
getting the total ingested
calories.
Transcribed Image Text:Food Group Calories Programming Exercise: Chocolate milk (1 cup), 208 A The given table on the right lists the Calorie contents of Pizza (cheese)(1 slice) several foods. Running or walking burns off about 100 Noodles (spaghetti)(1 cup) Calories per mile. Write a C++ program that requests the number of cups, slices, or pieces from the user the Apple (1 medium) number of the foods òn the list consumed. The program should then display the number of miles that must be run Orange (1) or walked to burn off the Calories represented in that food. Pineapple (1 cup) The program should run as follows: (The user may enter any number for each item in the program. The program will automatically compute the ingested calories and the miles to run) 290 159 81 Banana (1) 105 65 Potato (1 large, baked, plain) 220 Biscuit (1) 103 Rice, white (1 cup) 223 Observe that the result is a floating-point value for the miles, so you should use floating-point arithmetic to compute the answer for this problem. This time, use the compound assignment += for getting the total ingested calories.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY