|
|
back to boardWhy ''crash'?' Posted by a.kim 24 Oct 2009 13:19 var n,m,i,j:integer; a:array[1..1000]of integer; b:array[1..1000]of real; begin read(n,m); for i:=1 to m do readln(a[i]); for j:=1 to n do begin for i:=1 to m do begin if j=a[i] then b[j]:=b[j]+1; end; end; for i:=1 to n do begin b[i]:=(b[i]/m)*100; writeln(b[i]:0:2,'%'); end; end. Re: Why ''crash'?' read(n,m); ---> readln(n,m); try this |
|
|