10 RANDOMIZE TIMER/2
100 REM AUTHOR/IMPLEMENTOR - ?/E. KURAMOTO 
110 DIM L$(35) 
120 DIM J(35) 
130 DEF FNA(P1)=T+(N*P1) 
140 A9=-23.119
150 PRINT"HELLO, WITH WHOM AM I SPEAKING"; 
160 INPUT N$
170 PRINT "WELL ";N$;" HOW ARE YOU FEELING TODAY"; 
180 INPUT C$
190 FOR I=1 TO 7
200 READ H$ 
210 IF C$=H$ THEN 250 
220 NEXT I 
230 PRINT "THAT'S TOO BAD, I HOPE YOU FEEL BETTER SOON."
240 GOTO 260 
250 PRINT "THAT'S FUNNY, YOU DON'T LOOK SO GOOD FROM HERE." 
260 PRINT 
300 PRINT "DO YOU KNOW HOW TO USE THIS PROGRAM";
310 INPUT K$
320 IF LEFT$(K$,1)="Y" THEN 380
330 PRINT 
340 PRINT" THIS PROGRAM WILL ALLOW THE USER TO DO HIS SHOPPING VIA"
350 PRINT"THE TELETYPE. WHENEVER I ASK FOR THE NEXT ITEM, SELECT AN" 
360 PRINT"ITEM FROM THE FOLLOWING LIST:"
370 PRINT 
380 FOR I=1 TO 16
390 READ L$(I)
410 IF LEFT$(K$,1)="Y" THEN 430
420 PRINT " ";L$(I);
425 IF I/4=INT(I/4) THEN PRINT
430 NEXT I 
440 PRINT 
450 PRINT "WHEN YOU WANT YOUR TOTAL, JUST TYPE TOTAL AND YOU WILL" 
460 PRINT"BE GIVEN YOUR BILL." 
470 PRINT 
480 PRINT"HAVE FUN."
490 PRINT 
500 PRINT"WHAT WOULD YOU LIKE"; 
510 INPUT I$
520 IF I$="TOTAL" THEN 2260 
530 IF I$="SPECIAL" THEN 2500   
540 FOR I=1 TO 16 
550 IF I$=L$(I) THEN 690
560 NEXT I 
570 IF T1<4 THEN 600
580 PRINT "YOU'RE AN IMPOSSIBLE CASE ";N$ 
590 T1=-100 
600 IF T1<3 THEN 660
610 PRINT "ARE YOU SURE YOU KNOW HOW TO USE THIS PROGRAM"; 
620 INPUT U$
625 RESTORE:FOR I=1 TO 7:READ DU$:NEXT
630 PRINT "MAYBE I'D BETTER REFRESH YOUR MEMORY A BIT." 
640 T1=4
650 GOTO 330 
660 PRINT "SORRY, WE DON'T STOCK ";I$;", TRY AGAIN."
670 T1=T1+1 
680 GOTO 500 
690 IF I$<>"BEER" THEN 980 
700 PRINT 
710 PRINT "HOW OLD ARE YOU "; 
720 INPUT A 
730 IF A9=-23.119THEN 780
740 IF A9=A THEN 790
750 PRINT "THAT'S NOT WHAT YOU SAID THE FIRST TIME ";N$;", I DON'T" 
760 PRINT "KNOW IF I CAN TRUST YOU ANYMORE."
770 GOTO 500 
780 A9=A
790 IF A>3 THEN 830 
800 IF A <90 THEN 830 
810 PRINT "OK ";N$;" IF THAT'S THE WAY YOU WANT TO BE, FORGET IT." 
820 GOTO 500 
830 IF A>=21 THEN 860
840 PRINT "SORRY, NO ALCOHOLIC BEVERAGES WILL BE SOLD TO MINORS." 
850 GOTO 500 
860 PRINT "BEER IS $1.50 PER SIX-PACK, HOW MANY SIX PACKS"; 
870 GOSUB 2450 
880 IF N>8 THEN 930 
890 T=FNA(150) 
900 B=1 
910 B3=N
920 GOTO 500 
930 PRINT "ARE YOU GOING TO DRINK IT ALL YOURSELF"; 
940 INPUT D$
950 IF LEFT$(D$,1)<>"Y" THEN 890 
960 PRINT"SORRY, WE DON'T SERVE ALCOHOLICS HERE." 
970 GOTO 500 
980 IF I$<> "CHICKEN" THEN 1090 
990 PRINT "CHICKEN IS 69 CENTS A POUND, HOW MANY POUNDS"; 
1000 GOSUB 2450 
1010 IF N>14 THEN 1070 
1020 IF N>1.5 THEN 1050 
1030 PRINT "IF YOU CAN'T DO ANY BETTER THAN THAT ";N$;" I SUGGEST YOU" 
1040 PRINT"STOP BY THE LITTLE TAVERN ON THE WAY HOME." 
1050 T=FNA(69) 
1060 GOTO 500 
1070 PRINT "THAT'S NO CHICKEN, THAT'S AN EAGLE AND WE AIN'T GOT NONE." 
1080 GOTO 500 
1090 IF I$<> "COOKIES" THEN 1170
1100 IF X<1 THEN 1130
1110 PRINT"YOU'VE ALREADY HAD YOUR QUOTA OF COOKIES."
1120 GOTO 500
1130 PRINT "COOKIES ARE 79 CENTS  PER DOZEN AND ONE DOZEN IS ENOUGH."
1140 T=T+79 
1150 X=1
1160 GOTO 500 
1170 IF I$<>"SODA"THEN 1260 
1180 PRINT "SODA POP IS 65 CENTS A CARTON, HOW MANY CARTONS"; 
1190 GOSUB 2450 
1200 IF N>11 THEN 1230 
1210 T=FNA(65)
1220 GOTO 500 
1230 PRINT "YOU RATE OUR DISCOUNT PRICE FOR ADDICTS, ONLY 50 CENTS"
1240 T=FNA(50) 
1250 GOTO 500 
1260 IF I$<>"SOUP" THEN 1390
1270 PRINT "WHAT KIND OF SOUP WOULD YOU LIKE"; 
1280 INPUT T$ 
1290 PRINT"YUM, ";T$;" SOUP IS ESPECIALLY GOOD, AND A BARGAIN AT" 
1300 PRINT"25 CENTS PER CAN, HOW MANY CANS";
1310 GOSUB 2450 
1320 IF INT(N)=N THEN 1350 
1330 PRINT "SORRY, WE DON'T SPLIT UP CANS FOR ANYBODY."
1340 GOTO 500 
1350 IF N<10 THEN 1370 
1360 PRINT"WOW, YOU MUST REALLY LIKE ";T$;" SOUP." 
1370 T=FNA(25) 
1380 GOTO 500 
1390 IF I$<> "STEAK" THEN 1650 
1400 PRINT "WOULD YOU LIKE SIRLOIN, PORTERHOUSE OR ROUND STEAK";
1410 INPUT T$ 
1420 IF T$<> "ROUND" THEN 1500 
1430 PRINT "THERE IS A SPECIAL ON ROUND STEAK TODAY, ONLY 89 CENTS" 
1440 PRINT "PER POUND, HOW MANY POUNDS";
1450 GOSUB 2450 
1460 IF N<10 THEN 1480 
1470 PRINT "I WISH ALL CUSTOMERS WERE AS AFFLUENT AS YOU." 
1480 T=FNA(89) 
1490 GOTO 500 
1500 IF T$<> "SIRLOIN" THEN 1550
1510 PRINT"SIRLOIN IS $1.29 PER POUND, HOW MANY POUNDS";
1520 GOSUB 2450 
1530 T=FNA(129) 
1540 GOTO 500 
1550 IF T$<> "PORTERHOUSE" THEN 1630
1560 PRINT"I COMMEND YOUR GOOD TASTE, OUR PORTERHOUSE IS $1.89 PER" 
1570 PRINT"POUND, HOW MANY POUNDS WOULD YOU LIKE"; 
1580 GOSUB 2450 
1590 IF N<10 THEN 1610 
1600 PRINT"I CERTAINLY HOPE YOU CAN MEET YOUR BILL."
1610 T=FNA(189) 
1620 GOTO 500 
1630 PRINT "YOU HAD BETTER LEARN TO SPELL ";N$ 
1640 GOTO 500 
1650 IF I$<> "BREAD" THEN 1720 
1660 PRINT "BREAD IS 30 CENTS A LOAF, HOW MANY LOAVES.";
1670 GOSUB 2450 
1680 IF N<>.5 THEN 1700 
1690 PRINT "YOU KNOW WHAT THEY SAY....HALF A LOAF IS BETTER THAN NONE." 
1700 T=FNA(30) 
1710 GOTO 500 
1720 IF I$<>"EGGS" THEN 1960
1730 PRINT"WOULD YOU LIKE SMALL MEDIUM OR LARGE EGGS"; 
1740 INPUT T$ 
1750 IF T$<> "SMALL" THEN 1820 
1760 PRINT "SMALL EGGS ARE 52 CENTS PER DOZEN, HOW MANY DOZEN"; 
1770 GOSUB 2450 
1780 IF N<10 THEN 1800
1790 GOSUB 2430 
1800 T=FNA(52) 
1810 GOTO 500 
1820 IF T$<>"MEDIUM" THEN 1890 
1830 PRINT "MEDIUM EGGS ARE 64 CENTS PER DOZEN, HOW MANY DOZEN";
1840 GOSUB 2450 
1850 IF N<10 THEN 1870 
1860 GOSUB 2430 
1870 T=FNA(64) 
1880 GOTO 500 
1890 IF T$<> "LARGE" THEN 1630 
1900 PRINT "LARGE EGGS ARE 70 CENTS PER DOZEN, HOW MANY DOZEN"; 
1910 GOSUB 2450 
1920 IF N<10 THEN 1940 
1930 GOSUB 2430 
1940 T=FNA(70) 
1950 GOTO 500 
1960 IF I$<> "MILK" THEN 2050 
1970 PRINT "VERY GOOD, MILK HELPS BUILD STRONG BONES AND HEALTHY WHITE" 
1980 PRINT"TEETH. MILK IS 52 CENTS PER HALF GALLON, HOW MANY HALF GAL.";
1990 GOSUB 2450 
2000 IF B><1 THEN 2030 
2010 PRINT "MAYBE IF YOU DRINK IT ALL, IT WILL CURE THE EFFECT OF" 
2020 PRINT "ALL THAT NASTY BEER YOU ORDERED." 
2030 T=FNA(52) 
2040 GOTO 500 
2050 IF I$<> "JUICE" THEN 2180 
2060 IF B<> 1 THEN 2100 
2070 PRINT "YOU CAN ALREADY GET PRETTY WELL JUICED ON THOSE";B3;"SIX" 
2080 PRINT "PACKS YOU ORDERED." 
2090 GOTO 500 
2100 PRINT "WHAT KIND OF JUICE WOULD YOU LIKE"; 
2110 INPUT J$ 
2120 PRINT "I'M SORRY WE ARE TEMPORARIALY OUT OF ";J$;" JUICE, BUT I " 
2130 PRINT " GIVE YOU SOME NICE FROZEN GRAPEFRUIT JUICE FOR 29 CENTS PER" 
2140 PRINT"CAN, HOW MANY CANS"; 
2150 GOSUB 2450 
2160 T=FNA(29) 
2170 GOTO 500 
2180 IF I$<> "FISH"THEN 2230
2190 PRINT "WE HAVE FRESH HADDOCK AT 30 CENTS PER POUND, HOW MANY POUNDS"; 
2200 GOSUB 2450 
2210 T=FNA(30) 
2220 GOTO 500 
2230 PRINT "LIES, LIES, LIES, WE REALLY DON'T HAVE ANY ";I$ 
2240 GOTO 500 
2250 REM I"M REALLY JUST TOO LAZY TO WRITE THEN UP 
2260 PRINT "WILL THIS BE CASH OR CHARGE"; 
2270 INPUT C$ 
2280 IF C$<>"CHARGE"THEN 2310 
2290 PRINT "SORRY, YOUR CREDIT IS NOT GOOD HERE, BYE." 
2300 END 
2310 D=INT(T/100) 
2320 D=D+(T-(D*100))/100
2330 PRINT "YOUR BILL IS $";D 
2340 IF T>10000 THEN 2380 
2350 IF T< 1000 THEN 2400 
2360 PRINT"THANK YOU FOR SHOPPING HERE, COME AGAIN SOON." 
2370 END 
2380 PRINT "IT'S YOUR MONEY.....THANKS FOR STOPPING BYE, COME AGAIN." 
2390 END 
2400 PRINT"I HOPE YOUR THRIFT IS NOT DEPRIVING YOUR FAMILY."
2410 PRINT "STOP BY AGAIN WHEN YOU HAVE LESS TIME." 
2420 END 
2430 PRINT "YOU'D DO WELL TO BUY YOUR OWN CHICKEN." 
2440 RETURN 
2450 INPUT N
2460 IF N>=0 THEN 2490 
2470 PRINT "VERY FUNNY, ";N$;". LET'S TRY THAT AGAIN." 
2480 GOTO 2450 
2490 RETURN 
2500 IF S1<> 1 THEN 2530
2510 PRINT "SORRY ONLY ONE SPECIAL PER CUSTOMER."   
2520 GOTO 500  
2530 R=INT(RND(1)*10)+1
2610 FOR I= 1 TO R  
2620 READ S$,P$,U$,P
2630 NEXT I 
2640 PRINT "LUCKY YOU, THE SPECIAL OF THE DAY IS ";S$;" AT THE "
2650 PRINT"UNHEARD OF PRICE OF ";P$;" PER ";U$;", HOW MANY ";U$ ;"S";   
2660 GOSUB 2450 
2670 T=FNA(P)   
2680 S1=1   
2690 GOTO 500  
2700 DATA "NEAT","OK","FINE","PRETTY GOOD","GOOD","GREAT","WONDERFUL"  
2710 DATA"STEAK","CHICKEN","BEER","SODA","COOKIES","PORK CHOPS","MILK"  
2720 DATA  "SOUP","BREAD","JUICE","TURKEY","HAM","FISH","EGGS","BUTTER" 
2730 DATA "SPECIAL" 
2740 DATA "DENATURED LINSEED OIL","$2.95","GALLON",295  
2750 DATA "ASPARAGUS FLAVORED ICE CREAM","65 CENTS","HALF-GALLON",65
2760 DATA "RHUBARB","ONE DOLLAR","BUSHEL",100   
2770 DATA"IMPORTED YAK MILK","$5","OUNCE",500   
2780 DATA "PURPLE SADDLE SOAP","50 CENTS","CAN",50  
2790 DATA "1963 EDSELS","$999.95","EDSEL",99995 
2800 DATA "CLEAN WHITE BEACH SAND","$3","TON",300   
2810 DATA "BELLY-BUTTON LINT","$1.29","POUND",129   
2820 DATA "WEEK OLD HAMBURGER OF UNKNOWN ORIGIN","9 CENTS","POUND",9   
2830 DATA "USED Q-TIPS","25 CENTS","DOZEN",25   
