Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (* Pascal solution to codeabbey challenge 30 *)
- program reverse_string;
- var
- t:string;
- function revstr(my_s:string):string;
- var out_s:string;
- ls,i:integer;
- begin
- ls:=length(my_s);
- for i:=1 to ls do
- out_s:=out_s+my_s[ls-i+1];
- revstr:=out_s;
- end;
- begin
- t:=revstr('on fare supper off shelf jeopardy about cactus');
- writeln(t);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement