{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

IT210 Week 2 CheckPoint - Chapter 2 Programming Problem

# IT210 Week 2 CheckPoint - Chapter 2 Programming Problem -...

This preview shows pages 1–2. Sign up to view the full content.

IT/210 Check Point: Chapter 2 Programming Problem The manager of the Super Supermarket would like to be able to compute the unit price for products sold there. To do this, the program should input the name and price of an item and its weight in pounds and ounces. It should then determine and display the unit price (the price per ounce) of the item. Main Module Declare ItemName as string Declare ItemPrice as real Declare ItemWeightLb as real Declare ItemWeightOz as real Declare UnitPrice as real Write “Welcome.” Write “This program computes an item’s unit price (price per ounce).” Call Input Data Module Call Perform Calculations Module Call Output Results Module End Program Input data module

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Write “What is the item’s name?” Input ItemName Write “What is the item’s price?” Input ItemPrice Write “You will now enter the item’s weight (two steps).” Write “How many pounds does the item weigh (excluding ounces over nearest pound)?” Input ItemWeightLb Write “Now how many ounces?” Input ItemWeightOz End Input data module Perform calculations module Declare TotalOz as real Set TotalOz = ItemWeightLb * 16 + ItemWeightOz Set UnitPrice = ItemPrice / TotalOz End Perform calculations module Output results module Write “The item name is: ” ; ItemName Write “The price per ounce is : \$” ; UnitPrice End Output results module...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern