This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Declare ounces as integer Declare unit Price as real Write "Unit Price Program" Write "This program computes the unit price for an item" Call Input Data Module Call Perform Calculations Module Call Output Results Module End Program End Main Module Input Data Module Write "What is the item's name?" Input item Name Write "How much does the item cost?" Input price Write "What is the weight in pounds?" Input pounds Write "What are the fractional ounces?" Input ounces End Input Data Module Perform Calculations Module Set ounces = 16 * pounds + ounces Unit Price = price/ounces End Perform Calculations Module Output Results Module Write "The item is: “item Name Write "The total price of the item is: $", price Write "The unit price of the item is: $", unit Price, "per ounce" End Output Results Module...
View Full Document
- Spring '10
- Ring, Imperial units, United States customary units, Avoirdupois, Total order