MediaWiki:Sitenotice:
2025-12-29: I have restored the wiki to a backup from the end of November. Starting in September 2025, accesses went form the 800MB-1.2GB range per month to 26GB in September, 42GB in October, and 70GB in November with most accesses originating from China. As soon as I realized what was causing all the access problems in November, I shut it down (it had reached 36GB by then) behind a password/login screen. The database had gotten corrupted, and I tried a restore from just before the spike in access but that didn't work. Thus, end of November. I still have the other daily backups so if there were any important additions in December, let me know and maybe they can be recovered. - Allen H.

DIETCAL: Difference between revisions

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
Luis46coco (talk | contribs)
Created page with " 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 ..."
 
Polluks (talk | contribs)
Category
 
Line 44: Line 44:
  530 IF PR$="Y" THEN PRINT#-2,A$
  530 IF PR$="Y" THEN PRINT#-2,A$
  540 RETURN
  540 RETURN
[[Category:BASIC]]

Latest revision as of 21:10, 10 September 2015

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