import jeliot.io.*;
public class BalikAngka {
public static void balik(int n)
{
int temp = 0;
while (n>0)
{
temp = temp * 10 + n % 10;
if (temp == 0)
{
System.out.print("0");
}
n = n/10;
}
System.out.print(temp);
}
public static void main()
{
int bil;
System.out.print("Masukkan bilangan : ");
bil = Input.readInt();
System.out.print("Setelah dibalik : ");
balik(bil);
}
}
Tidak ada komentar:
Posting Komentar