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.

  1. ๐Ÿ‘ 0
  2. ๐Ÿ‘Ž 0
  3. ๐Ÿ‘ 104
asked by johnny
  1. i don't know the i need help with this question to help

    1. ๐Ÿ‘ 0
    2. ๐Ÿ‘Ž 0
    posted by sherry
  2. can I use google drive for create a flowchart

    1. ๐Ÿ‘ 0
    2. ๐Ÿ‘Ž 0
    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

    asked by Viper on April 5, 2011
  2. 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

    asked by Anonymous on November 14, 2010
  3. 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.

    asked by Anonymous on November 20, 2010
  4. 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.

    asked by Anonymous on November 14, 2010
  5. Computer Programing & Logic Design

    Submit pseudocode and a flowchart for the following programming exercise: Test Average and Grade Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the

    asked by Anonymous on November 20, 2010
  6. IT/210

    Assignment: Chapter 5 Programming Problems ยท Complete Programming Problems 1 and 2. ยท Provide the analysis, pseudocode and test cases using the template submitted in Week 6 only (no diagrams are required). Chapter 5 Programming

    asked by kevin on March 23, 2011
  7. computer science

    Your goal is to solve the following programming lab activity. Write a program that prompts & accepts a number between 1 and 12. After getting the input, display the number with the appropriate month. (example: This is the 1st

    asked by carol on May 22, 2011
  8. 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

    asked by Bryson on October 15, 2014
  9. 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

    asked by Bryson on October 15, 2014
  10. programming

    Step 1: Design a flowchart or write pseudocode for a program that allows a user to enter 12 numbers, then displays all of the numbers (in the order they were entered) as well as the largest number and the smallest number. Step 2:

    asked by G on November 25, 2014

More Similar Questions