English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

when a salesperson makes a sale, a record is created that includes the date,time and dollar amount of the
salespeople:Edwards,Rogers,Krybek,Delaney,LaFleur,Smith,Black. The pseudocode has to list totalsales,totalcommissions earned by all salespeople for time frames bade on the hour of the day(00-05.06-12,13-18 and 19-23)
here is a tabel that migth help:
FILE DESCRIPTIO: DECIMALS: SALEAMOUNT: RATE:
salespersons num $0 to&50,000 .04
moth num $51,000to$200,000 .05
day num $126,000to$200,000 .06
year num $201,000and up 0.7
time num
saleamount num

2007-11-20 04:48:25 · 1 answers · asked by Robert C 1 in Science & Mathematics Mathematics

1 answers

print ("Do your own homework.");

Seriously, if you want help you should try to write your question in a coherent manner. And try to show that you have at least some idea what you're doing.

As far as I can understand it you have a table which is being populated by some other process and you need pseudocode for a reporting function. It's not clear to me whether you want to report for each individual salesperson or the total across all.

Assuming you want a pesudocode in a procedural language (and not, say, a pseudo-SQL query, which would be much easier and more efficient), you'll need to do something like this (assuming you want the records split out by salesperson). These steps need to be be broken down further; I'm just outlining the process.

for each salesperson
. set up appropriate variables
. for all records in table
. . get salesperson, sales amount, time of day
. . if not same salesperson, skip to next record
. . calculate commission
. . update variables
. [end for]
. print results
[end for]

2007-11-22 12:54:41 · answer #1 · answered by Scarlet Manuka 7 · 0 0

fedest.com, questions and answers