Check Point Chapter 2

# Check Point Chapter 2 - Check Point Chapter 2 2 The manager...

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

Check Point Chapter 2 2. 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. Show a program name 2. Ask for the item name 3. Ask for the item price 4. Ask for item weight in pounds 5. Ask for ounces 6. Convert pounds to ounces and add it to the input ounces 7. Divide the total price by ounces 8. Show the price per ounce Input Item name (string item name) Item price (real: price) Item weight in pounds (integer: pounds) Fractional ounces (integer: ounces) Output Unit price (real: unit price) Design

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

View Full Document
Main Module Declare item name as string Declare price as real Declare pounds as integer Declare ounces as integer Declare unit price as real Write “unit price program” Write “this program finds the unit price for an item”
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

Check Point Chapter 2 - Check Point Chapter 2 2 The manager...

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

View Full Document
Ask a homework question - tutors are online