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 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.

  Develop a program to input miles driven and gallons for tank

Develop a program in C++ that will input the miles driven and gallons used (both as integers) for each tankful. The program should calculate and display the miles per gallon obtained for each tankful.

  Class to create and draw five squares

Now write applet DrawSquares that uses your Square class to design and draw 5 squares. This code must be very simple.

  Write pseudocode for worm moving toward apple

Worm is moving toward an apple. Each time it moves, worm cuts distance between itself and apple by its own body length until worm is close enough to enter the apple. Give pseudocode for this.

  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.

  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.

  Write program to create n-dimensional array on th runtime

Write a program to create an n-dimensional array on the runtime with the help of pointers. The user will enter on the run time that how many dimensions are required.

  Pseudocode to create thread-safe countdownevent by locks

Write pseudocode to implement a thread-safe CountdownEvent using locks and condition variables by implementing the following methods (lists 4 methods) and then "implement a Barrier using a CountdownEvent.

  Designing navigation system for point-and-click system

Design a navigation system or menu allows Access to act like point-and-click system. Write down some of the kinds of navigation.

  Creating a security policy by gathering information

Suppose mantle of a security consultant. You are asked to visit a client and gather information to develop a security policy for them.

  Write a program to enter the number of apartment units

Write a program that prompts the user to enter the number of apartment units, the rent to occupy all the units, the increase in rent that result in a vacant unit.

  Creating a software package for amazon

Suppose you are creating a software package for Amazon.com that needs users to enter their own passwords. Your software requires that users' passwords meet the following criteria:The password should be at least six characters long.

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