Radio Shack TRS-80 Model 100 Basic Manual page 52

Basic language lab
Hide thumbs Also See for TRS-80 Model 100:
Table of Contents

Advertisement

How the Sales Commissions Program Works
AMOUNT
OF SALES?
20 .--_ _'--_--,
COMPUTE 15%
COMMISSION
COMPUTE
ADDITIONAL
COMMISSION
COMMISSION IS
END
Figure 4-1. Flowchart of Sales Commission Program
When you execute the program, you will
be
prompted for the total sales. The
commission then will
be
computed according to the above scheme and printed.
Line
ut
allows you to enter the total sales, which is stored in the variable ST.
Line 28 computes the flat rate sales commission and stores it in the variable
eM.
Line
38
contains a new statement, the
IFITHEN
statement. As can
be
seen from the
flow chart in figure 4-1, the program must'branchafter line 20.
If
the sales exceed $2000, an additional computation must be performed. However, if
this is not the case, then the sales commission is already calculated in line 20 and no
additional computation is required.
46

Advertisement

Table of Contents
loading

Table of Contents