EasyManua.ls Logo

Atari 130XE

Atari 130XE
142 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MATH PROGRAMS
The computer's mathematical functions can be used for work pur-
poses,
as
well
as
for play. If you were a chef who prepared food for
banquets, you might need a computer to expand your recipes. For
instance, suppose that you are trying to figure out how many pounds
of sea scallops to buy to serve Coquilles St. Jacques at a dinner for
62
guests. Your recipe indicates that 1 1
/2
pounds of scallops feeds 5
people. The program below would tell you how many pounds to buy:
NEW
1.
REM
***
COQUILLE
***
1.9
PRINT"
I'Iii
"
29
GUESTS=62
39
POUNDSTOBUV=
1..5/5
*
GUESTS
49
PRINT:
PRINT
"BUV
";POUNDSTOBUV;"
POUNDS
OF
SCALLOPS."
59
END
The program produces the answer (18.6 pounds of scallops), but a
calculator would achieve the same result with less work.
To
make the
program more
us
eful,
al
low a variation
in
the number of guests by
in-
serting
an
INPUT statement. Type
in
the additional lines below:
1.5
PRINT:
PRINT
"HOW
MANV
GUESTS
DO
YOU
E)(PECT?"
29
INPUT
GUESTS
Run
the program several times, enteri ng a different number of guests
each time. The amount of scallops
ne
eded changes each time. For
200 guests, 60 pounds of scallops are required; for 436 guests, 130
.8
pounds. The I N
PUT
function makes the program more practical.
53

Table of Contents

Other manuals for Atari 130XE

Related product manuals