This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 INPUT"YEAR:",Y:INPUT"MONTH:",M ' IchigoJam: @machuoka | |
20 IF M=2 THEN L=28+((Y%4=0)*(((Y%100<>0)+(Y%400=0))>0)):GOTO 40 | |
30 L=31-((M=4)+(M=6)+(M=9)+(M=11)) | |
40 IF M<3 THEN Y=Y-1:M=M+12 | |
50 S=(Y+Y/4-Y/100+Y/400+(M*13+8)/5+1)%7 | |
60 I=S:D=1 | |
70 IF I=0 GOTO 90 | |
80 PRINT" ";:I=I-1:GOTO 70 | |
90 IF D<10 THEN PRINT" "; | |
100 PRINT D;" ";:IF D=L THEN PRINT:END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 INPUT"YEAR:",Y:INPUT"MONTH:",M | |
20 IF M=2 THEN L=28+((Y%4=0)*(((Y%100<>0)+(Y%400=0))>0)):GOTO 40 | |
30 L=31-((M=4)+(M=6)+(M=9)+(M=11)) | |
40 IF M<3 THEN Y=Y-1:M=M+12 | |
50 S=(Y+Y/4-Y/100+Y/400+(M*13+8)/5+1)%7 | |
60 IF M>12 THEN Y=Y+1:M=M-12 | |
70 I=S:D=1 | |
80 PRINT:PRINT" ";Y;" / ";M | |
90 PRINT:PRINT"S M Tu W Th F S" | |
100 IF I=0 GOTO 120 |