وهذا الحل كاملاً إذا ما فهمتي ،،
كود PHP:
package javaapplication12;
import java.util.*;
/
*
* @author deathpa1N
*/
public class JavaApplication12 {
/
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int a,b,c,d,e,f,g,h,i;
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter a Number to reverse: ");
a = keyboard.nextInt();
b = a % 10;
c = a / 10;
d = c % 10;
e = c / 10;
f = e % 10;
g = e / 10;
h = g % 10;
i = g / 10;
System.out.print("The reversed number is: "+b+d+f+h+i);