var s : string[50]; i, j, k : word; f : boolean; function isSpace(ch : char) : boolean; begin isSpace := false; if ch = ' ' then isSpace := true; end; begin f := false; repeat j := 0; writeln('введите строку, состоящую из 2 слов'); readln(s); for i := 1 to length(s) do if isSpace(s[i]) then begin inc(j); k := i; end; if j =1 then f := true; until f; write(copy(s, k + 1, length(s)), ' ', copy(s, 1, k - 1)); end. недавно такую писала :)
const
w=800;
h=600;
var
s:string;
x,y:integer;
begin
SetWindowSize(w,h);
ClearWindow(clGreen);
Write('Введите текст'); Read(s);
ClearWindow(clGreen);
SetFontSize(24);
SetFontColor(clRed);
x:=(w-TextWidth(s)) div 2;
y:=(h-TextHeight(s)) div 2;
TextOut(x,y,s);
end.