我编一串程序,运行时显示exitcode=201;请各位看看错在哪儿了(我先知道哪里错了,为什么错了,各位不用再打一遍了.....)
以下是代码:
program random;
var a:array[1..10]of integer;
n,i,j,m,s:integer;
begin
asssign(input,'random.in');reset;
asssign(output,'random.out');rewrite;
read(n);readln;
s:=n;
for i:=1 to n do read(a[i]);
for i:=1 to n do
for j:=1 to n do if a[i]>a[j] then begin
m:=a[j];
a[j]:=a[i];
a[i]:=m;
end;
for i:=1 to n do
for j:=i to n do
if a[i]=a[j] then begin
for j:=j+1 to n do
a[j]:=a[j+1];
s:=s-1;
end;
write(s);
writeln;
for i:=1 to s do write(a[s]);
readln;
close(input);
close(output);
end.