pascal 我的usaco程序哪里错了?

来源:百度知道 编辑:UC知道 时间:2024/05/15 16:22:45
program xiao(input,output);
const
dom:array[1..12]of integer=(31,28,31,30,31,30,31,31,30,31,30,31);
dae:array[1..7] of integer=(1,2,3,4,5,6,7);
var
n,i,j:integer;
panduan:boolean;
nian:integer;
sa,su,mo,tu,we,th,fr:integer;
k,daiti:integer;
zhouji:integer;

procedure addone;
begin
for j:=1 to 12 do
begin
daiti:=dom[j];
if (panduan=true) and (daiti=28) then daiti:=29;
for k:= 1 to daiti do
begin
if zhouji <>7 then zhouji:=zhouji+1
else zhouji:=1;
if k=13 then begin
case zhouji of
1:mo:=mo+1;
2:tu:=tu+1;
3:we:=we+1;
4:th:=th+1;
5:fr:=fr+1;

把write改成writeln
以后注意文件最后必须有回车符

=====================================

program xiao(input,output);
const
dom:array[1..12]of integer=(31,28,31,30,31,30,31,31,30,31,30,31);
dae:array[1..7] of integer=(1,2,3,4,5,6,7);
var
n,i,j:integer;
panduan:boolean;
nian:integer;
sa,su,mo,tu,we,th,fr:integer;
k,daiti:integer;
zhouji:integer;

procedure addone;
begin
for j:=1 to 12 do
begin
daiti:=dom[j];
if (panduan=true) and (daiti=28) then daiti:=29;
for k:= 1 to daiti do
begin
if zhouji <>7 then zhouji:=zhouji+1
else zhouji:=1;
if k=13 then begin
case zhouji of
1:mo:=mo+1;
2:tu:=tu+1;
3:we:=we+1;