practice for week 2 assignment

practice for week 2 assignment - The manager of the Super...

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

View Full Document Right Arrow Icon
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. Analysis Process : 1. Get user input unit price 2. Find room area (find unit price) input item name 3. Divide room area (input item name) find weight in pounds and ounces 4. Multiply gallons (input item price) 5. Prompt for ounces (determine price per ounce) prompt for ounces 6. Display total (display unit price per ounce) 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 lb. 7. Display total unit price per oz. or lb.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Input: Input: Item name (coffee beans) Price ($1000 per 100lb bag) Output:
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 / 4

practice for week 2 assignment - The manager of the Super...

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