This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Declare pounds as integer Declare ounces as integer Declare unitPrice 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 itemName 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 unitPrice = price/ounces End Perform Calculations Module Output Results Module Write "The item is: ", itemName Write "The total price of the item is: $", price Write "The unit price of the item is: $", unitPrice, "per ounce" End Output Results Module...
View Full Document
This note was uploaded on 11/29/2011 for the course IT210 IT210 taught by Professor Hh during the Spring '10 term at University of Phoenix.
- Spring '10