Program prečíta text a vypíše ho otočený odzadu
Delphi & Pascal (česká wiki)
Kategorija: KMP (Programy mladňakoch
Program: Reverse.pas
Subor exe: Reverse.exe
Program: Reverse.pas
Subor exe: Reverse.exe
Program prečíta text a vypíše ho otočený odzadu.
{ REVERSE.PAS } { User enters a phrase and program outputs the same phrase in reverse} { } { Author: Unknown } { Datum: 20.01.2009 http://www.trsek.com } program output_reverse_string; uses crt; var s : string; i : integer; begin clrscr; writeln ('PLease enter your name so it can be outputed in reverse order'); readln (s); writeln; for i := 1 to length(s) do begin end; writeln; for i := length(s) downto 1 do begin write(s[i]); end; readkey end.