Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. The American Heart Association suggests that at most 30 percent of the calori

ID: 3622779 • Letter: 2

Question

2. The American Heart Association suggests that at most 30 percent of the calories in our diet come from fat. Although food labels give the number of calories and amount of fat per serving, they often do not give the percentage of calories from fat. This percentage can be calculated by multiplying the number of grams of fat in one serving by 9, dividing that number by the total number of calories per serving, and multiplying the result by 100. Write a program that requests the name, number of calories per serving, and the grams of fat per serving as input, and tells us whether the food meets the American Heart Association recommendation. A sample run is as in Figure 4.8.
FIGURE 4.8 Sample run of Programming Project 2.
(An Introduction to Programming Using Visual Basic® 2008, 7th Edition. Prentice Hall/CourseSmart, 07/03/2008. 164).
<vbk:PBK9780136060734#page(164)>

Explanation / Answer



Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote