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. Analysis
Display program title.
Prompt for item name.
Prompt for price of item.
Prompt for weight of item in pounds.
Prompt for weight of item in ounces.
Convert pounds to ounces then add it to input ounces.
Dived price total by ounces.
Display price per ounce.
Item name (String: ItemName)
Item Price (Real: Price)
Item Weight in pounds (integer: Pounds)
Item Weight in ounces (integer: Ounces)
Unit Price (real: UnitPrice)
Declare ItemName as string
Declare ItemPrice as real
Declare ItemWeightLb as integer
Declare ItemWeight Oz as integer
Declare UnitPrice as real
Write “ Welcome User”
Write “ This program computes an unit items price (In Ounces)” Call Input Data Module
Call Perform Calculations Module
Call Output Results Module
End Main Module
Input Data Module
Write “ What is Items name?”
Write “ What is price of Item?”
Write “What is Item weight in pounds?”
Write “ What does item weigh converted into ounces?” Input ItemWeightOz
End Input Data Module
Perform Calculations Module
Declare TotalOz as real
Set ounces = 16 + pounds + ounces
UnitPrice = PoundPrice/16
TotalPrice = PoundPrice*(Pounds + Ounces/16)
End Perform Calculations Module
Output Results Module
Write “Item is” : ItemName
Write “Total Price of item is” : ItemPrice
Write “ Unit price of item is” : UnitPrice/Oz
End Output Results Module
Please join StudyMode to read the full document