public class rnum
{
public static void main(String[] arrs)
{
int a=321;
int mod=0;
int res = 0;
System.out.println("Reverse number res :"+a);
for(int i=0;i<3;i++)
{
mod=a%10;
res=mod+(res*10);
a=a/10;
}
System.out.println("Reverse number :"+res);
}
}
Sunday, December 14, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment