0 / 0 / 0
Регистрация: 19.10.2010
Сообщений: 9
|
|
1 | |
Азбука Морзе28.12.2010, 22:04. Показов 8732. Ответов 1
Метки нет Все метки)
(
Нужно создать программу, которая при вводе кодировке азбукой Морзе переводит точки и тире в нормальные буквы.
Мой код: Код
program Katia11; uses crt; var s,s2:string; i,j,j2,l,r:integer; begin clrscr; writeln('Введите кодировку: '); readln(s); l:=0; r:=0; for i:=1 to length(s) do begin if (s[i]=' ')or(i=length(s)) then begin r:=i; s2:=copy(s,l+1,r-l); if s2='.-' then s2:='А'; if s2='-...' then s2:='Б'; if s2='.--' then s2:='В'; if s2='--.' then s2:='Г'; if s2='-..' then s2:='Д'; if s2='.' then s2:='Е'; if s2='...-' then s2:='Ж'; (и так далее буквы) if s2='--..' then s2:='ç'; if s2='..' then s2:='ê'; if s2='.---' then s2:='ë'; if s2='-.-' then s2:='è'; if s2='.-..' then s2:='ï'; if s2='--' then s2:='î'; if s2='-.' then s2:='ì'; if s2='---' then s2:='Ä'; if s2='.--.' then s2:='Å'; if s2='.-.' then s2:='É'; if s2='...' then s2:='æ'; if s2='-' then s2:='Æ'; if s2='..-' then s2:='ô'; if s2='..-.' then s2:='ö'; if s2='....' then s2:='ò'; if s2='-.-.' then s2:='û'; if s2='---.' then s2:='ù'; if s2='----' then s2:='ÿ'; if s2='--.-' then s2:='Ö'; if s2='-..-' then s2:='Ü'; if s2='-.--' then s2:='¢'; if s2='-..-' then s2:='£'; if s2='..-.' then s2:='¥'; if s2='..--' then s2:='₧'; if s2='.-.-' then s2:='ƒ'; write(s2); l:=i; end; end; readln; end.
0
|
|
28.12.2010, 22:04 | |
Ответы с готовыми решениями:
1
Азбука Морзе Таблица шифрования Азбука Морзе
Текстовые файлы. Перевод теста в азбуку МОРЗЕ |
267 / 258 / 47
Регистрация: 08.10.2009
Сообщений: 554
|
||||||
28.12.2010, 22:38 | 2 | |||||
![]() Решение
0
|
28.12.2010, 22:38 | |
28.12.2010, 22:38 | |
Помогаю со студенческими работами здесь
2
Морзе. Заменить цифры на код морзе.
Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |