import java.util.Scanner;
public class NumberTurn{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String str;
while( sc.hasNext() ){
str = sc.nextLine();
char c [] = str.toCharArray();
String tmp = "";
for( int i = c.length - 1; i >= 0; i-- ){
tmp += c[i];
}
System.out.println( Integer.parseInt(tmp) );
}
}
}
題目
參考程式
2012年4月12日 星期四
Java 數字翻轉
訂閱:
張貼留言 (Atom)
I’m seriously happy to discover this great site the future of this blog is getting good and more useful for me thanks and god bless you.
回覆刪除IT Company India