Home   Easy-Code    Forum  Updater 
Twitter Facebook



Program to reverse a given line using pascal

Critics Rating:

Users Rating:

(*PROGRAM TO REVERSE A GIVEN LINE*)

program rev;

uses crt;

var

A:Array[1..50] of char;

i,x:integer;

begin

clrscr;

writeln("ENTER ANY SECTENCE ");

i:=0;

repeat

i:=i+1;

read(A[i]);

until A[i]=".";

x:=i;

for i:=x-1 downto 1 do

write(A[i]);

end.

Courtesy, Source, References & Regards: Kishore AVGK

While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright@2009-2011 by KuGuNi.com. All Rights Reserved.