如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
www.shishicaimh.comshishicaimh.com万年历的程序代码一年没碰Pascal了,写起来还有点吃力,希望对99级的同学有点帮助.:程序已编译通过;附2000年年历;:不足之处请大家批评指出.:只限参考,不可抄袭.:Programwnl(input,output);:label:again;:var:a:char;:i:integer;:ran,year,all_days,all_years:integer;:days_month,first_month:array[1..12]ofinteger;:proceduredisplay;:var:i,j,k,l,m,n,c,d,mm,nn:integer;:begin:forj:=0to5do:begin:mm:=1;:nn:=1;:k:=j*2+1;:l:=j*2+2;:m:=first_month[k];:n:=first_month[l];:ifm=0thenm:=7;:ifn=0thenn:=7;:fori:=1to21dowrite();:write(No.,k:2);:fori:=1to32dowrite();:writeln(No.,l:2);:fori:=1to8dowrite();:writeln(||mon|tur|wed|thr|fri|sat|sun||||mon|tur|wed|thr|:fri|sat|sun||);:write(||);:forc:=1to7doifc$#@60;mthenwrite(|)else:begin:write(mm:3,|);:mm:=mm+1;:end;:write(|||);:forc:=1to7doifc$#@60;nthenwrite(|)else:begin:write(nn:3,|);:nn:=nn+1;:end;:writeln(|);{thefirstline.}:ford:=1to5do:begin:write(||);:forc:=1to7doifmm>days_month[k]thenwrite(|)else:begin:write(mm:3,|);:mm:=mm+1;:end;:write(|||);:forc:=1to7doifnn>days_month[l]thenwrite(|)else:begin:write(nn:3,|);:nn:=nn+1;:end;:writeln(|);:end;:readln;:end;:end;:begin{main}:days_month[1]:=31;:days_month[2]:=28;:days_month[3]:=31;:days_month[4]:=30;:days_month[5]:=31;:days_month[6]:=30;:days_month[7]:=31;:days_month[831;:days_month[9]:=30;:days_month[10]:=31;:days_month[11]:=30;:days_month[12]:=31;:writeln(Thisprogrammayhelpyoutomakeacalenderoftheyearyo:uinput.);:again:year:=0;:ran:=0;:fori:=1to12dofirst_month[i]:=0;:writeln(Pleaseinputtheyearnumber:);:readln(year);:if(yearmod400=0)or((yearmod100$#@60;>0)and(yearmod4=0))then:ran:=1;:days_month[2]:=days_month[2]+ran;:all_years:=year-1;:all_days:=all_years+(all_yearsdiv4)-(all_yearsdiv100)+(all_years:div400);:first_month[1]:=(all_days+1)mod7;:fori:=2to12dofirst_month[i]:=(first_month[i-1]+days_month[i-1]):mod7;:display;:writeln(Pressentertocontinute,Ctrl+Ctoquit.);:readln;:gotoagain;:end.{main}:2000年年历::Thisprogrammayhelpyoutomakeacale