You are on page 1of 3

start

Declarations
num hours, minutes
num month, day, year
num saleAmt
num idNum
num person, x
num SSIZE = 4
num PSIZE = 7
num MSIZE = 12
num totalSales[MSIZE] = 0
num totalComm[PSIZE] = 0
num ID_NUM[PSIZE] = 103, 104, 201, 319, 367, 388, 435
string NAME[PSIZE] = “Darwin”, “Kratz”, “Shulstad”, “Fortune”, “Wickert”, “Miller”, “Vick”
num SALE_AMT[SSIZE] = 0, 51000, 126000, 201000
num COMM_RATE[SSIZE] = 0.04, 0.05, 0.06, 0.07
string MONTHS[MSIZE] = “January”, “February”, “March”
“April”, “May”, “June”, “July”, “August”, “September”, “October”,
“November”, “December”
getReady()
while not eof
detailLoop()
endwhile
finishUp()
stop

getReady()
output “Enter the salesperson ID number” input idNum
return

detailLoop()
person = 0
while person < PSIZE AND idNum not equal to ID_NUM[person] person = person +
1
endwhile
if person = PSIZE then
output “An invalid number has been entered, please try again”
else
input month, day, year, hours, minutes, saleAmt while month < 1 OR month >
12 OR day < 1 OR day > 31
output “Invalid date, please reenter”
input month, day, year
endwhile
totalSales[month-1] = totalSales[month-1] + saleAmt endif
output “Enter the salesperson ID number” input idNum
return

finishUp()
x=0
while x < MSIZE
output x+1, MONTHS[x], totalSales[x]
x=x+1
endwhile
return

You might also like