
Postlab Activities
Exercise 1: The American Heart Association publishes brochures describing what it
means to be “Heart Healthy.” We should watch our cholesterol and make sure that no
more than 30 percent of our calorie intake comes from fat. Write a program that reads
all the food items eaten in a day along with the fat content (in grams) and the calorie
content. (Assume that each food item appears on a line by itself, with the fat and
calories on the following line with a blank in between.) Echo-print your input on file
diet.out, followed by a statement that describes the day’s food intake as heart
healthy or not heart healthy. Your program should ...