fork download
  1. program lab10;
  2. var
  3. M: set of char;
  4. c: char;
  5. begin
  6. writeln('Please enter symbols');
  7. M := [];
  8. while not eof do
  9. begin
  10. read(c);
  11. if (c in ['f'..'m']) or (c in ['+','-','*','/']) then
  12. M := M + [c];
  13. end;
  14. writeln('Result:');
  15. for c := 'f' to 'm' do
  16. if c in M then
  17. write(c, ' ');
  18. if '+' in M then write('+ ');
  19. if '-' in M then write('- ');
  20. if '*' in M then write('* ');
  21. if '/' in M then write('/ ');
  22. writeln;
  23. end.
  24.  
Success #stdin #stdout 0s 5288KB
stdin
695486459083fgknfv,bxnbc zdndkgjfiu5968443w0t++++****fjr74
stdout
Please enter symbols
Result:
f g i j k + *