ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
893 B

  1. 10 REM DAYSOLD.BAS
  2. 20 INPUT "Enter your birthday (M,D,Y)";M,D,Y
  3. 30 REM Compute Julian Day Number
  4. 40 J=-INT(7*(INT((M+9)/12)+Y)/4)
  5. 50 S=SGN(M-9)
  6. 60 A=ABS(M-9)
  7. 70 J1=INT(Y+S*INT(A/7))
  8. 80 J1=-INT((INT(J1/100)+1)*3/4)
  9. 90 J=J+INT(275*M/9)+D+J1
  10. 100 J=J+1721028+367*Y
  11. 110 INPUT "Enter desired age in days ";A9
  12. 120 IF A9=0 THEN 280
  13. 130 REM Compute calendar date from new JD number
  14. 140 J2=J+A9+1
  15. 150 A1=INT((J2/36524.25)-51.12264)
  16. 160 A=J2+1+A1-INT(A1/4)
  17. 170 B=A+1524
  18. 180 C=INT((B/365.25)-0.3343)
  19. 190 D=INT(365.25*C)
  20. 200 E=INT((B-D)/30.61)
  21. 210 D=B-D-INT(30.61*E)
  22. 220 M=E-1
  23. 230 Y=C-4716
  24. 240 IF E>13.5 THEN M=M-12
  25. 250 IF M<2.5 THEN Y=Y+1
  26. 260 PRINT USING "You will be ##### days old on ##/##/####";A9;M;D;Y
  27. 270 GOTO 110
  28. 280 END
  29. 900 REM ---------------------------
  30. 910 REM APPEARED IN COMPUTERS IN
  31. 920 REM ASTRONOMY, SKY & TELESCOPE,
  32. 930 REM NOVEMBER 2001, PAGE 63
  33. 940 REM ---------------------------