Chapter 2 Programming Problem

Chapter 2 Programming Problem - Input price Write, “What...

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

View Full Document Right Arrow Icon
Analysis Process : 1. Get user input 2. Find item name 3. Find item weight 4. Find item price 5. Prompt for ounces 6. Divide price by ounces 7. Display total Input: Output: unit_cost (real: > 0) Design Main Module Declare price as real Declare weight as real Declare item name as string Declare outputPrompt as string Declare unitCost as real Get user input Find item name Find item price Divide price by weight Display total End Main Module Input Data Module Write, “What is the price per ounce of item?”
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Input price Write, “What is the item?” Input item Write, “What is the price of the item?” Input item price End Input Data Module Find Cost per Unit Module Declare price as real Item name (text) Item weight (real: 0-1000) Item price (real: 0-100) ounces (real: 0-100) Declare item weight as real Declare item name as text Unit Cost = item price / item weight End Find Room Area Module...
View Full Document

This note was uploaded on 05/20/2011 for the course IT 210 taught by Professor Josephpillera during the Spring '10 term at University of Phoenix.

Page1 / 2

Chapter 2 Programming Problem - Input price Write, “What...

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

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