Question: Lab 2 - Food Analyzer Flowchart ( 3 % ) Describe the solution to the following problem using the flowchart. We are required to determine

Lab 2- Food Analyzer Flowchart (3%)
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 9.
Now, calculate the number of fat calories per serving (use division)
and display it. For reference, here are the two sample output screen
shots.
1.
Enter name of food item, fatgrams and number of servings:
pizza
275
8
Calories in Pizza per serving: 309.38
Enter name of food item, fatgrams and number of servings:
fish
206
3
Calories in Fish per serving: 618.00
Note: Values in green font are inputs and with normal font are outputs.
Lab 2 - Food Analyzer Flowchart ( 3 % ) Describe

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!