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 ***
10 PRINT " "
20 GUESTS=62
30 P O U N D S T O B U Y = 1.5/5 * GUESTS
40 PRINT:PRINT "BUY " ; P O U N D S T O B U Y ; " POUNDS OF
SCALLOPS."
50 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 useful, allow a variation in the number of guests by in-
serting an INPUT statement. Type in the additional lines below:
15 PRINT : PRINT "HOW M A N Y GUESTS DO YOU EXPECT?"
20 INPUT GUESTS
Run the program several times, entering a different number of guests
each time. The amount of scallops needed changes each time. For
200 guests, 60 pounds of scallops are required; for 436 guests, 130.8
pounds. The INPUT function makes the program more practical.
53
Summary of Contents for 65XE
Page 1: ...ATARI 65XE PERSONAL COMPUTER OWNER S MANUAL TM...
Page 3: ...ATARI 65XE PERSONAL COMPUTER TM...
Page 6: ...Part 1 GettingStarted 1...
Page 9: ...4...
Page 23: ...18...
Page 25: ...20...
Page 32: ...Part 2 Programming withATARI BASIC 27...
Page 33: ...28...
Page 59: ...54...
Page 69: ...64...
Page 82: ...Part3 Appendices 77...
Page 83: ...78...
Page 97: ...92...
Page 105: ...100...
Page 125: ...120...
Page 126: ...121 Index...
Page 127: ...122...
Page 134: ...ATARI 1987 Atari Corp All Rights Reserved Printed in Taiwan C072018 001 REV B K l 2 1987...
Page 135: ......