我就写程序中重要的一段好了。 randomize; for i:=1 to 10 do begin a:=random(999);b:=random(999); c:=a+b; write(a,'+',b,'='); readln(n); while n<>c do begin wrieln('Wrong');readln(n);end; //如果解答错误则继续解答,直到正确为止 writeln('Right'); end;
我写骨干给你 for i:=1 to 10 do begin a:=random(1000)+1; b:=random(1000)+1; s:=a+b;writeln(a,'+',b,'='); read(n); if n=s then write('right') else write('wrong'); end; 不懂就追问追问