Created
October 23, 2014 15:35
-
-
Save machuoka/2293c980282ed1f330f6 to your computer and use it in GitHub Desktop.
カレンダープログラミング for IchigoJam
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 | |
110 PRINT" ";:I=I-1:GOTO 100 | |
120 IF D<10 THEN PRINT" "; | |
130 PRINT D;" "; | |
140 IF D=L GOTO 170 | |
150 IF (D+S)%7=0 THEN PRINT | |
160 D=D+1:GOTO 120 | |
170 PRINT:PRINT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment