The_Law

Untitled

Dec 14th, 2017
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.33 KB | None | 0 0
  1. program ideone;
  2.  
  3. var
  4. cnt: array[1..26] of integer;
  5. i: integer;
  6. c: char;
  7.  
  8. begin
  9.     for i := 1 to 26 do
  10.         cnt[i] := 0;
  11.  
  12.     read(c);
  13.  
  14.     while c <> '.' do
  15.     begin  
  16.         cnt[ord(c) - ord('a')] := cnt[ord(c) - ord('a')] + 1;
  17.         read(c);
  18.     end;
  19.  
  20.     for c := 'a' to 'z' do
  21.         if cnt[ord(c) - ord('a')] = 1 then
  22.             write(c, ' ');
  23.  
  24. end.
Advertisement
Add Comment
Please, Sign In to add comment