/*Reverse Of a Number*/
public class reverse_no {
public static void main(String args[])
{
int arr[]=new int[10];
int no=123456789;
for(int i=0;i<10;i++)
{
if(no != 0)
{
arr[i]=no%10;
no=no/10;
System.out.print(arr[i]);
}
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment