2 Replies - 1901 Views - Last Post: 22 April 2013 - 04:06 PM

#1 sarahbanana  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-April 13

Creatinga pseudocode and a flowchart can be using word

Posted 22 April 2013 - 03:16 PM

john raymond was so pleased with the program you created for his clients that he regers you to his coworker,a nutrionist in the same facility.The nutrionist would like you to create a program that calculates fat grams and calories.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 then 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 x9.
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 nutritionist classify a food as low fat if less than 30 percent of its calories come from fat.if the results of this fomrula are less then 0.3 the program should display a message indicating the food is low in fat.
Create a pseudocode and a flowchart

Another thing is this can just be in simple language which means i can just write it in word,and
the flowchart also,ive tried doing the pseudocode im totally lost like i have no idea even where to being honestly,please help you thank you so much!

Is This A Good Question/Topic? 0
  • +

Replies To: Creatinga pseudocode and a flowchart can be using word

#2 sarahbanana  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-April 13

Re: Creatinga pseudocode and a flowchart can be using word

Posted 22 April 2013 - 03:23 PM

can someone please help me!
Was This Post Helpful? 0
  • +
  • -

#3 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10664
  • View blog
  • Posts: 39,608
  • Joined: 27-December 08

Re: Creatinga pseudocode and a flowchart can be using word

Posted 22 April 2013 - 04:06 PM

Moved to Software Development, since this isn't a C/C++ question.

The validation part really writes itself. If calories < 0, do you have a problem? How should you respond?

Quote

-make sure the number of fat grams and calories are not less then 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 x9.


Quote

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

Again, this part is a formula. How do you calculate percentages? How do you calculate 30% of this number?

Try articulating the logic back in your own words.

Also, please avoid needlessly bumping your threads. You don't need to post, then bump less than 10 minutes later. The same goes for duplicate threads; keep it at one thread per project. Thank you!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1