--- title: "Program Printout: Lemonade" type: "article" slug: "program-printout-lemonade" url: "http://localhost/article/program-printout-lemonade/" markdown_url: "http://localhost/article/program-printout-lemonade.md" published_at: "2020-10-27T17:09:13+00:00" modified_at: "2025-09-23T19:00:36+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "The children are screaming, the sun is roasting, it is a perfect day for the beach. You are the budding entrepreneur on the lemonade stand, trying to outsell your rivals and lay the foundations of a fast food empire. You start with capital of $50 and have to decide how much to spend on advertising,…" category: - name: "Timex Sinclair User" slug: "timex-sinclair-user" taxonomy: "category" url: "http://localhost/category/periodicals/timex-sinclair-user/" post_tag: - name: "1983" slug: "year-1983" taxonomy: "post_tag" url: "http://localhost/tag/year-1983/" - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" publication: "Timex Sinclair User" publication_r: id: 10278 title: "Timex Sinclair User" type: "periodical" url: "http://localhost/periodical/timex-sinclair-user/" volume: "1" issue: "1" issues_articles: - id: 26866 title: "Timex Sinclair User n1" type: "issue" url: "http://localhost/issue/timex-sinclair-user-n1/" pages: "32-33" pubdate: "June 1983" download: "http://localhost/wp-content/uploads/2023/04/Lemonade.P.zip" archive_link: false volumeissue: "v1n1" article_media: - id: 60602 title: "Lemonade" type: "computer_media" url: "http://localhost/computer_media/lemonade-2/" --- # Program Printout: Lemonade The children are screaming, the sun is roasting, it is a perfect day for the beach. You are the budding entrepreneur on the lemonade stand, trying to outsell your rivals and lay the foundations of a fast food empire. You start with capital of $50 and have to decide how much to spend on advertising, how much on stock and what price to charge for each glass. Lower-case letters in the listing signify inverse video. ## Source Code: Lemonade ``` 278 PRINT "L E M O N A D E" 279 PRINT "-----------------------------" 280 PRINT AT 10,0;"DO YOU REQUIRE INSTRUCTIONS ? (Y/N)" 290 LET A$=INKEY$ 300 IF A$="Y" THEN GOTO 9000 310 IF A$="N" THEN GOTO 330 320 GOTO 290 330 CLS 340 PRINT AT 10,0;"HOW MANY PLAYERS (2-4) ?" 350 INPUT P 360 IF P<2 OR P>4 THEN GOTO 350 361 CLS 362 PRINT AT 10,0;"HOW MANY DAYS DO YOU WANT TO PLAY (MAX=14) ?" 363 INPUT AD 364 IF AD<1 OR AD>14 THEN GOTO 363 369 CLS 370 DIM M(P) 380 DIM A(P) 390 DIM R(P) 395 DIM L(P) 400 DIM B(P) 410 DIM Q(P) 420 DIM I(P) 430 FOR F=1 TO P 440 LET M(F)=25 470 LET A(F)=0 500 LET R(F)=0 530 LET B(F)=0 531 NEXT F 532 FOR E=1 TO AD 533 PRINT "L E M O N A D E %D%A%Y ";E;AT 2,0;"''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''" 534 LET W=INT (RND*4) 535 IF W=0 OR W=3 THEN LET W$="%S%U%N%N%Y" 536 IF W=1 THEN LET W$="%R%A%I%N" 537 IF W=2 THEN LET W$="%S%N%O%W" 538 PRINT AT 10,10;W$ 539 PRINT AT 15,0;"LEMONDSVILLE WEATHER REPORT" 540 FOR U=1 TO 100 541 NEXT U 551 LET AP=INT (RND*3)+1 552 LET BP=INT ((RND*4)+1)*0.5 553 FOR F=1 TO P 560 CLS 570 PRINT "L E M O N A D E" 571 PRINT ,,"''''''''''''''''''''''''''''''''''''''''''''''''''''''''''" 580 PRINT ,,,,,,"%P%L%A%Y%E%R ";F 590 PRINT ,,,,"%M%O%N%E%Y £";M(F) 600 PRINT ,,,,"%A%D%V%E%R%T%I%S%E%M%E%N%T%S ? EACH BOARD COSTS £";AP 610 INPUT A(F) 660 PRINT AT 12,15;A(F) 670 PRINT AT 13,0;" " 680 LET M(F)=M(F)-(A(F)*AP) 690 PRINT AT 9,7;M(F);" " 700 PRINT AT 15,0;"%B%O%T%T%L%E%S ? EACH BOTTLE MAKES 10 GLASSES" 710 PRINT "BOTTLES COST £";BP 720 INPUT B(F) 770 PRINT AT 15,8;B(F) 775 LET M(F)=M(F)-(B(F)*BP) 790 PRINT AT 9,7;M(F);" " 800 PRINT AT 16,0;" %P%R%I%C%E% %O%F% %L%E%M%O%N%A%D%E% %P%E%R% %G%L%A%S%S ? IN PENCE" 810 INPUT L(F) 820 LET L(F)=INT ABS L(F) 830 PRINT AT 18,28;L(F);"P" 835 PRINT AT 19,0;" " 840 FOR T=1 TO 100 850 NEXT T 860 NEXT F 870 IF W$="%S%U%N%N%Y" THEN LET G=175 880 IF W$="%R%A%I%N" THEN LET G=75 890 IF W$="%S%N%O%W" THEN LET G=10 900 CLS 910 PRINT "L E M O N A D E %D%A%Y ";E 920 PRINT ,,"''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''" 921 PRINT AT 6,9;W$ 925 LET V=INT (RND*50)+G 930 PRINT AT 6,9;W$ 940 PRINT AT 10,0;"TODAY THERE WERE ";V;" VISITORS" 950 FOR U=1 TO 125 960 NEXT U 970 CLS 980 DIM S(P) 990 FOR C=1 TO P 1000 LET Q(C)=B(C)*10 1010 NEXT C 1020 FOR C=1 TO P 1030 LET I=V*10 1040 LET S(C)=I/L(C) 1050 IF L(C)>30 AND L(C)<=50 THEN LET S(C)=INT (RND*(V/(V-2))) 1060 IF L(C)>50 THEN LET S(C)=0 1070 LET Z=RND*A(C)*5 1080 LET S(C)=S(C)+(Z*2) 1085 LET S(C)=INT (S(C)*0.75) 1090 NEXT C 1095 LET N=0 1100 FOR O=1 TO P 1110 LET N=N+S(O) 1120 NEXT O 1130 IF N>V THEN LET M=N-V 1140 IF N>V THEN LET M=INT (M/P) 1150 IF N>V THEN FOR Y=1 TO P 1160 IF N>V THEN LET S(Y)=S(Y)-M 1170 IF N>V THEN NEXT Y 1180 FOR H=1 TO P 1190 IF S(H)>Q(H) THEN LET S(H)=Q(H) 1195 IF S(H)<0 THEN LET S(H)=0 1196 IF S(H)>V THEN LET S(H)=V 1200 NEXT H 1210 FOR J=1 TO P 1220 PRINT "L E M O N A D E" 1230 PRINT "''''''''''''''''''''''''''''''''''''''''''''''''''''''''''" 1241 LET MY=INT (S(J)*L(J))/100 1242 LET M(J)=M(J)+MY 1250 PRINT ,,,,"%P%L%A%Y%E%R ";J;" %M%O%N%E%Y £";M(J);" " 1260 PRINT ,,,,"%Y%O%U% %S%O%L%D ";S(J);" %G%L%A%S%S%E%S" 1265 PRINT ,,,,"%Y%O%U% %H%A%D% %E%N%O%U%G%H% %L%E%M%O%N%A%D%E% %F%O%R ";Q(J) 1266 PRINT ,,,,"%P%R%I%C%E% %O%F% %L%E%M%O%N%A%D%E% %P%E%R% %G%L%A%S%S ";L(J);"P" 1267 PRINT ,,,,"%A%D%V%E%R%T%I%S%E%M%E%N%T%S ";A(J) 1270 PRINT ,,,,"%P%R%O%F%I%T £";MY-BP*B(J)-AP*A(J) 1280 FOR U=1 TO 100 1290 NEXT U 1300 CLS 1310 NEXT J 1320 NEXT E 1329 REM %T%H%E% %N%E%X%T% %L%I%N%E% %D%O%E%S% %N%O%T% %M%A%K%E% %S%E%N%S%E%,% %S%O% %I% %H%A%V%E% %D%I%S%A%B%L%E%D% % %I%T%.% % % % % % % % % % % % % % % % % % % % % % % %(%J%I%M%G%) 1330 REM GOSUB 10 1335 PRINT AT 5,19; 1340 FOR U=1 TO P 1345 PRINT TAB 19;"%P%L%A%Y%E%R ";CHR$ (U+156) 1350 PRINT TAB 21;"£";M(U) 1360 PRINT 1365 PRINT 1370 NEXT U 1380 PRINT AT 3,0;"ANOTHER GAME (Y OR N) ?" 1390 LET X$=INKEY$ 1400 IF X$="Y" THEN GOTO 330 1410 IF X$="N" THEN STOP 1420 GOTO 1390 8998 SAVE "LEMONADE" 8999 RUN 9000 CLS 9010 PRINT " L E M O N A D E" 9020 PRINT ,,,,,,"THE OBJECT OF THIS GAME IS TO MAKE AS MUCH MONEY (£) AS POSSIBLE." 9025 PRINT "YOU OWN A STALL NEAR A BEACH IN THE RESORT OF LEMONDSVILLE. YOU SELL LEMONADE AND TRY TO MAKE A PROFIT. TO START WITH YOU HAVE £25 TO BUY LEMONADE FROM THE WHOLESALER." 9030 PRINT "YOU CAN ALSO ADVERTISE YOUR LEMONADE BUT IT ALL COSTS MONEY." 9040 PRINT AT 21,0;"PRESS ANY KEY" 9050 IF INKEY$="" THEN GOTO 9050 9060 GOTO 330 9500 FOR F=1 TO 5 9510 NEXT F 9520 RETURN ```