感谢世外苏子恒同学提供
uses crt;
var
i,a,b,c,d,df:byte;
na:string;
procedure intro;
begin
clrscr;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln('数 学 测 验':47);
writeln;
writeln('作者:苏子恒':46);
writeln;
writeln;
writeln;
writeln;
writeln;
writeln('退出请按 CTRL+C':48);
writeln;
write('继续请按回车':46);
readln;
end;
procedure start;
begin
clrscr;
writeln;
writeln;
writeln;
writeln('考 试 说 明':47);
writeln;
writeln;
writeln;
writeln;
writeln;
writeln('本次考试共有10题,每题10分':53);
writeln;
writeln;
writeln('答题完毕后,系统会显示你的得分':55);
writeln;
writeln;
writeln('请在下面输入你的姓名,输入完毕按回车来开始考试':63);
write('姓名:':40);readln(na);
end;
begin
intro;
start;
cursoroff;
clrscr;
df:=0; randomize;
writeln;
writeln;
writeln('XX小学一年级期末考试(加法计算)':56);
writeln;
writeln;
for i:=1 to 10 do begin
a:=random(100);
b:=random(100);
c:=a+b;
write('第',i:2,'题:',a:2,' + ',b:2,' = ');
readln(d);
if d=c then df:=df+10;
end;
writeln;
writeln;
writeln(na,',你的分数是:',df,'分');
writeln;
readln;
end.