主题:求高手帮忙编个好看的万年历!本人初学!谢谢大家!
lc851216
[专家分:0] 发布于 2006-10-17 11:06:00
求高手帮忙编个好看的万年历!本人初学!谢谢大家!
最好不要太难 呵呵!
回复列表 (共2个回复)
沙发
lc851216 [专家分:0] 发布于 2006-10-19 15:39:00
每人帮忙吗??
板凳
hxy_anhui [专家分:320] 发布于 2009-01-30 13:44:00
CLS
INPUT N, M
DIM A(12)
FOR I = 1 TO 12
READ A(I)
NEXT I
DATA 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
IF N MOD 400 = 0 OR N MOD 4 = 0 AND N MOD 100 <> 0 THEN A(2) = 29
IF N > 2008 THEN R = (N - 2008 + 3) \ 4 ELSE R = (2008 - N) \ 4
R = R - ABS(N - 2008) \ 100 + ABS(N - 2008) \ 400
P = ABS(N - 2008) - R
IF N > 2008 THEN S = (2 + 2 * R + P) MOD 7 ELSE S = (2 - 2 * R - P) MOD 7 + 7
FOR I = 1 TO M - 1
S = S + A(I)
NEXT I
S = S MOD 7
PRINT " SUN MOD TUE WED THU FRI SAT"
PRINT TAB(S * 4 + 1);
FOR I = 1 TO 7 - S
PRINT USING "####"; I;
NEXT I: PRINT
FOR J = I TO A(M): PRINT USING "####"; J;
K = K + 1: IF K MOD 7 = 0 THEN PRINT
NEXT J
END
我来回复