Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Slon;
- var i,n:integer;
- slons:array[1..989] of integer;
- count:array[1..8] of integer;
- begin
- read(n);
- for i:=1 to n do
- begin
- read(slons[i]);
- case slons[i] of
- 1:Inc(count[1]);
- 2:Inc(count[2]);
- 3:Inc(count[3]);
- 4:Inc(count[4]);
- 5:Inc(count[5]);
- 6:Inc(count[6]);
- 7:Inc(count[7]);
- 8:Inc(count[8]);
- end;
- end;
- for i:=1 to 8 do
- write(i,' ',count[i],' ');
- END.
Add Comment
Please, Sign In to add comment