Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program n8;
  2. var
  3.  count:array[char] of word;
  4.  filename:string;
  5.  sym:char;
  6.  i:integer;
  7. begin
  8.  readln(filename);
  9.  assign(input,filename);
  10.  reset(input);
  11.  while not eof(input) do begin
  12.  read(sym);
  13.  count[sym]:=count[sym]+1
  14.  end;
  15.  for i:=0 to 255 do
  16.  if count[chr(i)]<>0 then writeln(chr(i),' ',count[chr(i)])
  17. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement