Sunday, May 6, 2018

Palindrome Number in Turbo Pascal

In this article I would like to share with you a program that will prompts the user to give a number and then the program will check if the given number is a palindrome or not a palindrome using Pascal as our programming language.

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

My email address are the following jakerpomperada@gmail.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.





Sample Program Output


Program Listing

palindrome.pas

program PalindromeNumber;

uses
  WinCrt;

var

n,m,x,r,s:longint;


Begin
  

write('Palindrome Number in Turbo Pascal');
writeln;
writeln;
write('Give a Number :  ');

read(n);

m:=n;

r:=0;

while n>0 do

begin

x:=n mod 10;

r:=r*10+x;

n:=n div 10;

end;


writeln;
writeln;

if m=r then
begin

writeln('The given number ' ,m, ' is  a Palindrome Number.')
end

else

writeln('The given number ' ,m, ' not a Palindrome Number.');

end.



No comments:

Post a Comment