Earn by twitter on twivert

Sign up for PayPal and start accepting credit card payments instantly.

Sunday, January 3, 2010

WAP to check palendron


/*WAP to check palendron*/

import java.lang.*;
class palindrome
{
int num,i,rem,rev=0,status;
palindrome(int a)
{
num=a;
}
void calculate()
{

i=num;
while(i>0)
{
rem=i%10;
rev=rev*10+rem;
i=i/10;
}
if(num==rev)
status=1;

else
status=0;

}

void display()
{
if(status==1)
System.out.println("palindrome"+rev);
else if(status==0)
System.out.println("Not palindrome"+rev);
}
}
class demo_palendron
{
public static void main(String arg[])
{
palindrome p1=new palindrome(231);
p1.calculate();
p1.display();
}
}

No comments:

Post a Comment

ADS

How to earn online

How to earn online:
Step - 1 :
signup for PayPal, to recieve your online earning
click here:
https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL
step - 2 : Singup these 4 sites & earn & enjoy! Read site to know how to earn.
1. trekpay
Earn up to $0.02 (2 cents) per click.
http://www.trekpay.com/?ref=34690
2. neobux
Earn up to $0.02 (2 cents) per click.
Click here:
http://www.neobux.com/?r=Moneyearner786

AddMe

Bookmark and Share