public class DoWhile{
public static void main(String[] args){
int n = 5678;
int t,r = 0;
System.out.println("Original No. : " + n);
do{
t = n % 10;
r = r * 10 + t;
n = n / 10;
}while (n > 0);
System.out.println("Reverse No. : " + r);
}
}
गणपती बाप्पा मोरया
-
*Lord Ganesh Utsav is greatly celebrated All over India, especially in the
Maharashtra state .*
10 years ago
1 comments:
Very Useful. For more examples visit http://answersz.com
Post a Comment