Sunday, November 1, 2020

String Palindrome in Pascal

 A simple program that I wrote using Pascal to check if the given string or number is a palindrome or not a palindrome.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price.

My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com


Program Listing


(* Palindrome.Pas *)

(* Author    : Mr. Jake Rodriguez Pomperada, MAED-IT, MIT *)

(* Webite    : www.jakerpomperada.com  / www.jakerpomperada.blogspot.com *)

(* Email     : jakerpomperada@gmail.com    *)

(* Location  : Bacolod City, Negros Occidental, Philippines *)


program Palindrome;


var

  S: string;

  i, f: integer;

begin

  writeln;

  Write('String Palindrome in Pascal');

  writeln;

  writeln;

  f := 0;

  Write('Give a String : ');

  Readln(S);


  writeln;

  for i := 1 to length(S) div 2 do

    if s[i] <> s[length(s) - i + 1] then

    begin

      Write('The given string ', S, ' is not a Palindrome.');

      f := 1;

      break;

    end;

  if f = 0 then

  begin

    Write('The given string ', S, ' is a Palindrome.');

  end;

  writeln;

  writeln;

  Write('End of Program');

  Readln;

end.

No comments:

Post a Comment