Question: Lab 2 - Food Analyzer Flowchart ( 3 % ) Describe the solution to the following problem using the flowchart. We are required to determine
Lab Food Analyzer Flowchart
Describe the solution to the following problem using the flowchart.
We are required to determine how many calories a food item has per
serving due to its fat content.
The algorithm accepts the name of food item, the number of grams of
fat and the number of servings. The name of the food item is a String
variable. Remember that string values are always enclosed in
Calculate the number of calories in the food item due to fat content,
which is computed by multiplying fat grams and calories per gram.
Assume the calories per gram are
Now, calculate the number of fat calories per serving use division
and display it For reference, here are the two sample output screen
shots.
Enter name of food item, fatgrams and number of servings:
pizza
Calories in Pizza per serving:
Enter name of food item, fatgrams and number of servings:
fish
Calories in Fish per serving:
Note: Values in green font are inputs and with normal font are outputs.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
