uses graph; var p: array[5..9]of integer; f: text; a, i,d, m: integer; s: string; begin for i:=5 to 9 do p[i]:=0; assign(f, 'pikkused.txt'); reset(f); while not eof(f) do begin readln(f, a); case a of 150..159: inc(p[5]); 160..169: inc(p[6]); 170..179: inc(p[7]); 180..189: inc(p[8]); 190..199: inc(p[9]); end; end; close(f); for i:=5 to 9 do writeln(p[i]); d:=detect; initgraph(d, m, 'c:\bp\bgi'); for i:=5 to 9 do begin bar(100+70*(i-5), 400-(p[i]*10), 100+70*(i-4), 400); end; a:=0; while(a<=30) do begin str(a:2, s); outtextxy(1, 400-a*10, s); a:=a+5; end; settextstyle(DefaultFont,VertDir,1); a:=155; while(a<200) do begin str(a:2, s); outtextxy(135+7*(a-155), 430, s); a:=a+10; end; readln; closegraph; end.