// PascalABC.NET 3.0, сборка 1156 от 30.01.2016 begin var s:=ReadlnString('Вводите:'); s:=s.Replace('AND','OR'); s:=s.Replace('And','Or'); s:=s.Replace('and','or'); Writeln; Writeln(s) end.
Тестовое решение: Вводите: And for the Birds? Mowgli let out a kite’s whistle. And now for the Snake People. The answer was a perfect hiss. Mowgli clapped his hands happily and jumped on Bagheera’s back.
Or for the Birds? Mowgli let out a kite’s whistle. Or now for the Snake People. The answer was a perfect hiss. Mowgli clapped his hors happily or jumped on Bagheera’s back.
program proga_25_1; Var A: text; i,j,n,m : byte; d: string; Sim:char; Begin write('Введите имя текстового файла '); {Например: "test" он создастся там где находится сама программа } read(d); Assign(A,d); rewrite(A); write('Введите количество строк: N= '); readln(n); write('Введите количество символов в строке: M= '); readln(m); for I:=1 to n do begin Sim:=Chr(Ord('1')+I-1); For J:=1 to m do write(A,Sim); writeln(A); end; close(A); end.
Program proga; Var p: text; i, n : byte; s,min,m: string; Begin write('Введите имя файла '); {Например: C:.txt} read(m); Assign(p,m); reset(p); read(p,s); min:=s; n:=100; for i:=1 to n do begin readln(p,s); while not eof(p) do {нахождение минимальной строки} begin readln(p,s); if length(s) <= length(min) then min:=s; end; end; close(p); write('самая короткая строка: ',min); End.
begin
var s:=ReadlnString('Вводите:');
s:=s.Replace('AND','OR');
s:=s.Replace('And','Or');
s:=s.Replace('and','or');
Writeln;
Writeln(s)
end.
Тестовое решение:
Вводите: And for the Birds? Mowgli let out a kite’s whistle. And now for the Snake People. The answer was a perfect hiss. Mowgli clapped his hands happily and jumped on Bagheera’s back.
Or for the Birds? Mowgli let out a kite’s whistle. Or now for the Snake People. The answer was a perfect hiss. Mowgli clapped his hors happily or jumped on Bagheera’s back.