The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 3 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
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 9. Make sure that the number of calories entered is not greater than fat grams 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 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 formula are less than 0.3, the program should display a message indicating the food is low in fat.
----------- He-----------llo----------- Si-----------r/M-----------ada-----------m ----------- ----------- ----------- ----------- -----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e