uses crt; const Num = [48..57]; Hletter = [128..159]; aletter = [160..175]; rletter = [224..239]; sign= [43..46]; morze_num: array[48..57] of string[6] = ('/-----','/.----','/..---','/...--','/....-', '/.....','/-....','/--...','/---..','/----.'); morze_Hletter: array[128..159] of string[6] = ('/.-', '/-...','/.--','/--.','/-..','/.','/...-','/--..','/..','/.----','/-.-','/.-..', '/--','/-.','/---','/.--.','/.-.','/...','/-','/..-','/..-.','/....','/-.-.','/---.', '/----','/--.-','/***','/-.--','/-..-','/..-..','/..--','/.-.-'); morze_aletter: array[160..175] of string[6] = ('/.-', '/-...','/.--','/--.','/-..','/.','/...-','/--..','/..','/.----','/-.-','/.-..', '/--','/-.','/---','/.--.'); morze_rletter: array[224..239] of string[6] = ('/.-.','/...','/-','/..-','/..-.','/....','/-.-.','/---.', '/----','/--.-','/***','/-.--','/-..-','/.-..','/..--','/.-.-'); morze_sign: array[43..46] of string[7] = ('/.-.-.','/.-.-.-','/.---..','/......'); var txt: array[1 .. 3] of string; i, j: integer; s,d: string; begin clrscr; writeln('‚ขฅคจโฅ โฅชแโ ญฅ กฎซ์่ฅ 3-ๅ แโเฎช :'); writeln('ออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออ'); for i := 1 to 3 do begin readln(txt[i]); s := txt[i]; txt[i] := ''; for j := 1 to length(s) do begin if ord(s[j]) in num then txt[i] := txt[i] + morze_num[ ord(s[j])] else if ord(s[j]) in Hletter then txt[i] := txt[i] + morze_Hletter[ord (s[j])] else if ord(s[j]) in aletter then txt[i] := txt[i] + morze_aletter[ord (s[j])] else if ord(s[j]) in rletter then txt[i] := txt[i] + morze_rletter[ord (s[j])] else if ord(s[j]) in sign then txt[i] := txt[i] + morze_sign[ord (s[j])] else if ord(s[j]) =33 then txt[i] := txt[i] + ('/--..--') else if ord(s[j]) =63 then txt[i] := txt[i] + ('/..--..') else if ord(s[j]) =58 then txt[i] := txt[i] + ('/---...') else if ord(s[j]) =59 then txt[i] := txt[i] + ('/-.-.-.') else if ord(s[j]) =32 then txt[i] := txt[i] + (' ') else txt[i]:= txt[i]+s[j]+(' - "ฏฅเฅขฎค ญฅฎแใ้ฅแโขจฌ"'); end; end; writeln('ฎซใ็ ฅฌ ชฎค Œฎเงฅ :'); writeln('ษออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป'); for i := 1 to 3 do begin s:= txt[i]; for j := 1 to length(s) do begin delay(7000); if ord(s[j]) = 45 then Sound(700); Delay(4000); NoSound; delay(7000); if ord(s[j]) = 46 then Sound(700); Delay(600); NoSound ; write(s[j]); end; end; writeln; writeln('‚‚…„ˆ’… ENTER „‹Ÿ ‚›•Ž„€':50); readln; end.