You are on page 1of 2

McCoy, Daniel

CISP-300
Assignment 3

I. Describe the problem

Write an inventory report program. With the input values of the item number, quantity, and unit price of an item, get
an inventory value by multiplying the quantity by the unit price. If the inventory value is more than \$1,000, write the
item number and the amount that it exceeds \$1,000 by. If the inventory value is less than \$1,000, write the item
number and the inventory value.

II. Table of variables

Name Data Type Range Description
INUM number 1000 - 9999 The item number
QUANTITY number 0 - 9999 The quantity of an item
UPRICE number 0.01 - 9999 The item’s unit price
INVENTORY number 0 - 99999 The item’s inventory value

III. Pseudo Code

Start
INVENTORY = QUANTITY * UPRICE
If INVENTORY > 1000 Then
INVENTORY = 1000 – INVENTORY
Write “Inventory value of item “, INUM, “ exceeds \$1,000 by “, INVENTORY
Else
Write “Inventory value of item “, INUM, “ is “, INVENTORY
Endif
Stop
IV. Program flow chart

START

QUANTITY, UPRICE

INVENTORY =
QUANTITY * UPRICE

Y N

INVENTORY
>

WRITE
INVENTORY = “Inventory value of
1000 - INVENTORY item “, INUM, “ is
“, INVENTORY

“Inventory value of
item “, INUM, “
exceeds \$1,000 by “,
INVENTORY

STOP