SHARE
TWEET

array for hist

a guest Apr 25th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var i,j,a,b:integer;
  2.     x,summ:real;
  3.     h:array[1..100] of integer;
  4.     hist_mini:array[1..10] of integer;
  5. begin
  6.    for i:=1 to 1000000 do
  7.    begin
  8.       for j:=1 to 1000 do
  9.          begin
  10.          x:=random(1000)/1000;
  11.          summ:=summ+x;
  12.          end;
  13.       while summ>b*10 do inc(b);
  14.       inc(h[b]);
  15.       summ:=0;
  16.    end;
  17.    for i:=1 to 100 do writeln('h[',i,']=',h[i]);
  18. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top