
08.12.2009, 23:36
|
|
Участник форума
Регистрация: 05.06.2009
Сообщений: 127
С нами:
8912059
Репутация:
249
|
|
Код:
Program Zamena;
var
strInput,strOutput,strTemp:string;
intI:integer;
begin
writeln('vvedite stroku');
readln(strInput);
for intI:=1 to length(strInput) do begin
case strInput[intI] of
'.':strTemp:='...';
':':strTemp:='-';
'-':strTemp:=':';
else strTemp:=strInput[intI];
end; {case}
strOutput:=strOutput+strTemp;
end;
writeln(strOutput);
readln;
end.
Код:
vvedite stroku
hello world ... Hello:word hellow - world
hello world ......... Hello-word hellow : world
Код:
vvedite stroku
123.123:123-1.2.3-3:2:1 - 1
123...123-123:1...2...3:3-2-1 : 1
|
|
|