Last active
April 19, 2025 02:40
-
-
Save fu-sen/7274264 to your computer and use it in GitHub Desktop.
カレンダー ( Calendar ) - SHARP POCKET COMPUTER PC-G850 series BASIC https://poke-com.jimdofree.com/basic-%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0/
This file contains hidden or 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
1 ' Calendar | SHARP POCKET COMPUTER PC-E200 / G series BASIC | |
2 ' Copyright (c) 2006-2009 BALLOON | FU-SEN | |
3 ' The MIT License (MIT) - https://mit.balloon.net.eu.org/#2006-2009 | |
100 DIM D(12) | |
110 INPUT "ネン = ";Y | |
120 INPUT "ツキ = ";M | |
130 FOR I=1 TO 12:READ D(I):NEXT I | |
140 IF Y MOD 4=0 AND (Y MOD 100<>0 OR Y MOD 400=0 ) LET D(2)=D(2)+1 | |
150 IF M<3 LET Y=Y-1:M=M+12 | |
160 O = INT (Y+ INT (Y/4)- INT (Y/100)+ INT (Y/400)+ INT ((13*M+8)/5)+1) MOD 7 | |
170 IF M>12 LET M=M-12 | |
180 CLS :LOCATE 0,0 | |
190 PRINT "SunMonTueWedThuFriSat" | |
200 IF O>0 FOR I=1 TO O:PRINT " ";:NEXT I | |
210 I=O:FOR J=1 TO D(M) | |
220 PRINT USING "###";J; | |
230 I=I+1:IF I=7 PRINT :I=0 | |
240 NEXT J | |
250 IF INKEY$ ="" GOTO 250 | |
260 DATA 31,28,31,30,31,30 | |
270 DATA 31,31,30,31,30,31 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment