Sitenotice: 11/29/2018: The wiki is back. It turns out, some anti-virus product on my web server had an issue with the latest version of PHP. My server techs have resolved this issue, and things should be working again. During the investigation, I did restore to a backup from September. There is a chance that any changes done since then were lost, but I do not recall any edits. --OS-9 Al

8/30/2016: Massive re-work is being done on the InfoBox Templates. Read that page to keep up with the plan for that, and adding better keyword tags (categories) to all the pages. --OS-9 Al (talk) 15:28, 31 August 2016 (CDT)

DIETCAL

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
100 CLS: PRINT@5,"DIET CALCULATOR"
110 PRINT@64,"ENTER AGE, 20 TO 65";:INPUT AG$
120 IF (VAL(AG$)>=20) AND (VAL(AG$)<=65) THEN AG=VAL(AG$): GOTO 140
130 PRINT@64,"": GOTO 110
140 PRINT@96,"WEIGHT NOW, 100 TO 250";: INPUT CW$
150 IF (VAL(CW$)>=100) AND (VAL(CW$)<=250) THEN CW=VAL(CW$): GOTO 170
160 PRINT@96,"": GOTO 140
170 PRINT@128,"ENTER AMOUNT OF DAILY ACTIVITY, I FOR INACTIVE, S FOR SOME,"
180 PRINT@192,"M FOR MODERATE, AND G FOR GREAT";: INPUT AC$
190 IF AC$="I" THEN AC=12: GOTO 240
200 IF AC$="S" THEN AC=13.5: GOTO 240
210 IF AC$="M" THEN AC=15: GOTO 240
220 IF AC$="G" THEN AC=16.5: GOTO 240
230 PRINT@192,"": GOTO 180
240 MC=AC*( 1-(AG-20)*( .2/45))
250 PRINT @224,"ENTER CALORIES PER DAY FOR ";
260 PRINT@256,"DIET, 1000 TO 4999";: INPUT CD$
270 IF (VAL(CD$)>999) AND (VAL(CD$)<5000) THEN CD=VAL(CD$): GOTO 290
280 PRINT@256,"": GOTO 250
290 PRINT @288,"TO PRINTER (Y OR N)";: INPUT PR$
300 IF NOT (PR$="Y" OR PR$="M") THEN PRINT@288,"": GOTO 290)
310 DA=1
320 A$="": GOSUB 510
330 A$="CHART OF CALCULATED DAILY"+CHR$(13)
340 A$=A$+"WEIGHTS AT"+STR$(CD)+" CALORIES/DAY": GOSUB 510
350 A$="": GOSUB 510
360 A$="DAY    NET LOSS  NEW WEIGHT": GOSUB 510
370 A$="": GOSUB 510
380 CL=(CW*MC)-CD
390 NL=CL/3500
400 CW=CW-NL
410 A$=STR$(DA): IF DA<10 THEN A$=A$+"      ": GOTO 440
420 IF (DA>9) AND (DA<100) TNEN A$=A$+"     ": GOTO 440
430 A$=A$+"    "
440 A$=A$+LEFT$(STR$(NL),4)+"      "+LEFT$(STR$(CW),6): GOSUB 510
450 DA=DA+1
460 IF (CW<100) OR (CW>250) THEN 480
470 GOTO 380
480 PRINT "PRESS R TO RESTART";
490 A$=INKEY$: IF A$<>"R" THEN 490
500 GOTO 100
510 PRINT A$
520 REM***CHANGE NEXT "PRINT#-2," TO "LPRINT" FOR MC-10***
530 IF PR$="Y" THEN PRINT#-2,A$
540 RETURN