Design a program which asks for the number of fat grams and

Assignment Help Computer Engineering
Reference no: EM13466880

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.

Reference no: EM13466880

Questions Cloud

Explain a time when you made a major purchase car boat : 1.explain a time when you made a major purchase car boat house land etc. if you have never made a major purchase ask a
The supreme court has repeatedly asserted that a defendant : a detective is called to a crime scenenbspwhere the female victim is in the kitchen and has been stabbed 13 times.
Carefully review search results and write short paper about : search the internet for math symbols in real life. carefully review the search results and write a short paper about
Did the juvenile have the mental capacity to know right : discussion based on your readings do juveniles possess the mental capacity to distinguish between right and
Design a program which asks for the number of fat grams and : design a program that asks for the number of fat grams and calories in a food item. validate the input as follows- make
Discuss why convicted felons struggle with re-integration : 1.discussion read the article california state prison corcoran and respond to the following question should the state
Is the victim selection process different between team : write a 2 page paper. nbspaddress the following in your paperis the victim selection process different between team
Design a program which asks for the number of tickets sold : a dramatic theater has three seating sections and it changes the following prices for tickets in each section section a
Possible ethical considerations for your business : 1.possible ethical considerations for your business including any social responsibility plans or attributes that your

Reviews

Write a Review

Computer Engineering Questions & Answers

  Security vulnerability

What is the security vulnerability of this solution

  You will be developing a human elements in it strategy

you will select a real or fictitious organization and apply your research to the development of a strategy that would

  Give a short overview of any five programs

Visit Web sites for companies that sell computer peripherals. Compile a list that contains as many types of input and output devices as you can locate on these Web sites. After compiling this list, be sure to document the Web sites you viewed to d..

  Write down a program which compute the average of a group

write a program that calculate the average of a group of test scores where the lowest score is dropped. it should use

  Which is the best option in your opinion

Conceivably, there are three choices for a front-end application to your SQL Server database solution. This includes a compiled binary executable that is stored on client computer, a web-based user interface, or a Microsoft Access project. Given t..

  What do you mean by "file type"

What is "File Type" and what are some of the important information to know about it.

  Choose a company intranet or portal and describe the object

choose a company Intranet or Portal and describe the object.

  Possible media solutions that will support this download

You are sitting at your desk at work, using your laptop computer. The boss calls an emergency meeting for you and several coworkers, and asks everyone to bring his or her laptop computer.

  What effect has the change in organizational culture

although, in a significant number of cases, these cultures have later tended to diverge radically from the founders' original ideals.

  Develop an application with the chosen dbms

A school intends to procure the integrated student management application holding all details of registered students including personal information, courses taken, and examination grades.

  Explain the fundamentals of object oriented programming

With down a brief introduction, explain the fundamentals of Object Oriented programming and its differences from procedural programming.

  How do their business and it strategies seem to match does

how do their business and it strategies seem to match? does it look like their product and service offerings are well

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