| 1 | program morse;\r |
| 2 | uses crt;\r |
| 3 | const\r |
| 4 | tab: array ['A'..'Z'] of string[6] = (\r |
| 5 | '._','_...','_._.','_..','.','.._.','__.','....','____','..',\r |
| 6 | '.___','_._','._..','__','_.','___','.__.','._.','...','_','.._',\r |
| 7 | '..._','_.__','__..');\r |
| 8 | var\r |
| 9 | s:string;\r |
| 10 | i:byte;\r |
| 11 | \r |
| 12 | begin\r |
| 13 | writeln ('***PROGRAM *M*O*R*S*E* ---- PREVEDE TEXT DO MORSEOVY ABECEDY*** ');\r |
| 14 | write ('ZADEJ TEXT PRO PREVOD: '); READLN (s);\r |
| 15 | \r |
| 16 | FOR i:= 1 TO LENGTH (s) DO\r |
| 17 | CASE s[i] OF\r |
| 18 | 'A'..'Z','a'..'z': WRITE (Tab[Upcase (s[i])],'|');\r |
| 19 | ' ' WRITE ('|');\r |
| 20 | END;\r |
| 21 | end.\r |