Program sablier; Var esp,ch:string; (*******************************************) Procedure affiche_bas(var esp:string;ch:string); Var ch2:string; n,i:integer; Begin esp:=''; n:=0; i:=1; Writeln(ch); Repeat esp:=' '+esp; n:=n+2; i:=i+1; ch2:=esp+copy(ch, i, length(ch)-n); Writeln(ch2); Until length(copy(ch, i, length(ch)-n))=1; End; (******************************************) Procedure affiche_haut(esp,ch:string); Var i,n:integer; ch2:string; begin i:=-1; n:=1; Repeat n:=n+2; i:=i+1; delete(esp,1,1); ch2:=esp+copy(ch, length(ch) div 2-i, n); Writeln(ch2); Until ch2=ch; End; (********************PP***********************) Begin Repeat Writeln('CH = '); Readln(ch); Until (ch<>'') and (odd(length(ch))); affiche_bas(esp,ch); affiche_haut(esp,ch); End.