Answered step by step
Verified Expert Solution
Question
1 Approved Answer
table [ [ Cereal A , 2 . 6 4 , 0 . 2 6 , 0 . 3 6 ] , [ Cereal
tableCereal ACereal BCereal CCereal D
Figure : Input File
By reading the input file that you have prepared, your program should be able to:
a Calculate the conversion of the nutrient values in ounce oz into gram g with two decimal places. Note:
b Calculate the DV of each nutrient g for each cereal. Note: The daily recommended value for all three nutrients are as follows:
Carbohydrate Protein Fat
c Calculate the average DV of Carbohydrate, Protein and Fat for all cereals.
d Determine and display the category of each nutrient, either low, moderate or high.
e Output on screen: Ask the user to enter choice of nutrient carbohydrate protein, fat and level low moderate, high and display the food listed under that category eg Figure
Carbohydrate
Protein
Eat
Please enter your choice
Low
Moderate
High
Please enter your choice
List of cereals with high amount of protein:
Cereal B
Cereal
Choose again?
Figure : Screen output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started