week two cost program in pseudocode

week two cost program in pseudocode - Process: 1. 2. 3. 4....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Process: 1. Get user input 2. Input item name 3. Input price of item ($1000 for 1lb) 4. Divide price by ounces and pounds (1lb for $1000 then 1oz. = $62.5) 5. Prompt for number of ounces or pounds 6. Multiply the dividend unit price by number of oz. or multiply number of pounds by item price. 7. Display total unit price per oz. or lb. Input: Item name (coffee beans) Price ($1000 per 1lb bag) Output: Total_cost (real: > 0) Main Module Declare item price as real Declare unit price per unit of weight as real Declare number of units as real Declare units (oz. or lb.) needed as real Declare output prompt as string Declare total cost as real Get user input Input item name Input price of item Divide price by ounces (1lb for $1000 and 1 oz. for $62.50)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Multiply # of pounds by item price Prompt for ounces or pounds Multiply the dividend unit price by number of oz. Multiply the number of pounds by the item price. Display total unit price per oz. or lb.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

week two cost program in pseudocode - Process: 1. 2. 3. 4....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online