Programming

Submit pseudocode and a flowchart for the following programming exercise:

Fat Gram Calculator

Design a program that asks for the number of fat grams and calories in a food item. Validate the input as follows:

- Make sure the number of fat grams and calories are not less than 0.

- According to nutritional formulas, the number of calories cannot exceed fat grams X 9. Make sure that the number of calories entered is not greater than fat grams x 9.

Once correct data has been entered, the program should calculate and display the percentage of calories that come from fat. Use the following formula:

Percentage of calories from fat = (fat grams x 9) / calories

Some nutritionists classify a food as "low fat" if less than 30 percent of its calories come from fat. If the results of this forumlas are less than 0.3, the program should display a message indicating the food is low in fat.

asked by johnny
  1. i don't know the i need help with this question to help

    posted by sherry
  2. can I use google drive for create a flowchart

    posted by Lydia

Respond to this Question

First Name

Your Response

Similar Questions

  1. Computer programming

    Submit pseudocode for the following programming exercise: Fat Gram Calculator Design a program that asks for the number of fat grams and calories in a food item. Validate the input as follows: - Make sure the number of fat grams
  2. Is My Pseudocode Correct? - Programming

    I am supposed to make a pseudocode for a fat gram calculator. These are the instructions: Design a program that asks for the number of fat grams and calories in a food item. Validate the input as follows: - Make sure the number of
  3. programming

    I am supposed to make a pseudocode for a fat gram calculator and I want to know if my code is correct. This is the instructions: Design a program that asks for the number of fat grams and calories in a food item. Validate the
  4. Fat gram calculator

    Design a program that asks the user for the number of fat grams and calories in a food item. Validate the input as follows. Make sure the number of fat grams and calories are not less than 0. According to nutritional formulas, the
  5. Computer Programing & Logic Design

    Submit pseudocode and a flowchart for the following programming exercise: Software Sales A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity Discount
  6. Sic / 241

    Can u please tell me if i figured this right? Part B: Calculating Calories Complete the equations below by using the information you obtained in Part A tables. Use figure 5.19 of the Visualizing Nutrition textbook as a guidance.
  7. Math

    Coould someone please let me know if I did this equation correctly. This question relates the topic of "Are you Sure It's Fat Free". To analyze the protein content I used 4 calories per gram of protein, rather than the 9 calories
  8. Computer Programing & Logic Design

    Submit pseudocode and a flowchart for the following programming exercise: Largest and Smallest Design a program with a loop that lets the user enter a series of numbers. Theuser should enter -99 to signal the end of the series.
  9. Computer Programing & Logic Design

    Submit pseudocode and a flowchart for the following programming exercise: Largest and Smallest Design a program with a loop that lets the user enter a series of numbers. Theuser should enter -99 to signal the end of the series.
  10. math

    how can i make the content equal the same %? what did i do wrong? Dinner: Chicken role protein Fat content = 2.5 grams 1 gram contains fat of 9 calories 2 grams contain fat of 9 x 2.5 = 22.5 calories Total quantity = 400 calories

More Similar Questions