Chapter 2 Programming Problem

Chapter 2 Programming Problem - Output Results Module Write...

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

Chapter 2 Programming Problem Initial pseudocode Input Data Module Input item name, unit price, weight of item (in pounds and ounces) Perform Calculations Module Compute total ounces Compute unit price per ounce Output Results Module Output the input data and unit price per ounce Refined version of pseudocode Input Data Module Prompt for item name, unit price, weight of item (in pounds and ounces) Input item name, unit price, weight of item (in pounds and ounces) Perform Calculations Module Set total ounces = 16 * pounds + ounces Set price per ounce = unit price / total ounces

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Output Results Module Write item name, unit price, weight of item (in pounds and ounces) Write unit price per ounce Refined pseudocode for input and output modules Input Data Module Write “What is the item’s name?” Input item name Write “What is the unit price and weight of item?” Input unit price and weight of item in pound and ounces Output Results Module Write “The item is:”, Item name Write “Unit price per ounce is: “, Price of item per ounce...
View Full Document

This note was uploaded on 07/05/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 - Output Results Module Write...

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

View Full Document
Ask a homework question - tutors are online