Cocker

Untitled

Apr 2nd, 2011
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.37 KB | None | 0 0
  1. program Slon;
  2. var i,n:integer;
  3. slons:array[1..989] of integer;
  4. count:array[1..8] of integer;
  5. begin
  6. read(n);
  7. for i:=1 to n do
  8. begin
  9. read(slons[i]);
  10. case slons[i] of
  11. 1:Inc(count[1]);
  12. 2:Inc(count[2]);
  13. 3:Inc(count[3]);
  14. 4:Inc(count[4]);
  15. 5:Inc(count[5]);
  16. 6:Inc(count[6]);
  17. 7:Inc(count[7]);
  18. 8:Inc(count[8]);
  19. end;
  20. end;
  21. for i:=1 to 8 do
  22. write(i,' ',count[i],' ');
  23. END.
Add Comment
Please, Sign In to add comment