Write program to show percentage of calories come from fat

Assignment Help Programming Languages
Reference no: EM1368645

Write a program that asks the user to enter the number of calories and fat grams in a food item. The program should display the percentage of the calories that come from fat. One gram of fat has 9 calories, so:

(Calories from fat) = (fat grams) * 9

The percentage of calories from fat can be calculated as:

(Calories from fat) / (total calories)

If the calories from fat are less than 30% of the total calories of the food, it should also display a message indicating the food is low in fat.

Reference no: EM1368645

Questions Cloud

Explain when ginn realized that his jacket was still : Explain When Ginn realized that his jacket was still in the nightclub, he attempted to reenter the premises. He was met at the door by the manager
Explain common valuation approaches : Common valuation approaches-Which of the three most common valuation approaches do you think are most appropriate?
Economic opportunities : Should a country's income be distributed to its members according to their contributions to the members' requires? Should society attempt to equalize income/economic opportunities?
Important information about medical office procedures : Suggest a procedure to ensure timely billing and describe the importance of such procedures for timely billing and explain how timely billing relates to the medical office's cash flow.
Write program to show percentage of calories come from fat : Write a program which asks user to enter number of calories and fat grams in a food item. The program must display percentage of the calories that come from fat.
Explain ethical behavior can shift depending on situation : Explain Ethical behavior can shift depending on the situation and In order for an organization to eliminate unethical behavior, it will have a code of conduct in place
Show the inancial reporting : Why is it important to report discontinued operations or extraordinary items separately from income from continuing operations and is this method of reporting allowed? What concerns does this type of reporting create?
Compute net income : Carmen opens a retail store. Her sales during 1st year are $600,000, of which $30,000 has not been collected at the year end. Her purchases are $400,000.
Explain what are the pros and cons of each vendor : Explain What are the pros and cons of each vendor and What are some issues you would consider in making the decision to select a database vendor for an organization you work for?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write procedure list-records whihc returns list of records

Write a procedure called list-records which returns a list of all records by artist from a list of records containing several artists.

  Write program to compute student-s quiz average

Write a program that will compute student's quiz average. Program must prompt the user for the number of quizzes and then ask the user for each quiz grade.

  Explaining the situation in program

Which of the following best explains the situation after Line 1 has been executed?

  Write program that asks user to enter five test scores

Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score.

  Writing code in client program to enter score

Write down code in a client program to perform the following: prompt user to enter score and set score data member for player1.

  Write pseudocode and flowchart for program

Write pseudocode and flowchart for program that will prompt the user for a number, prompt the user for an operator (+,-,*,/).

  Creating printstream object using dos

Create a PrintStream object using dos and assign the resulting reference to ps, a PrintStream variable that has already been declared.

  Determining suitable parameters if pass-by-reference is used

Subprocedures in VBA utilize pass-by-reference. Which function or sub procedure alters its parameter?

  Program to ask how many games are being purchased

Your program should ask the store clerk how many games are being purchased and calculate a total due (with 6% tax). The total number of games, the discount amount.

  Write program that takes input arithmetic expression

Write a program that takes as input an arithmetic expression. The program outputs whether the expression contains matching grouping symbols.

  Program in visual basic to calculate area of triangle

Write a program in visual basic to calculate area of a triangle.

  Computing average net profit per sale of product

Your company bought 250,000 online advertising impressions and made average net profit per sale of product of $5.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd