import java.util.*;
import java.io.BufferedReader;//關鍵
import java.io.IOException;//關鍵
import java.io.InputStreamReader;//關鍵
class StaticTest{
?
?static int i=47;
?
?static void incr(){
??
??StaticTest.i++;
?}
?
?static int ternary(int i){
??return i<10?i*100:i*10;
?}
?
?static int alternative(int i){
??if(i<10)
??return i*100;
??else
??return i*10;
??
?}
?
?public static void main(String[] args)throws NumberFormatException, IOException{//關鍵 拋出異常
??
??int i=0;
??BufferedReader br=null;
??//StaticTest str1=new StaticTest();
??//StaticTest str2=new StaticTest();
??//System.out.println("str1.i="+str1.i);
??//System.out.println("str2.i="+str2.i);
??//incr();
??
??System.out.println("請輸入值1:");
??br=new BufferedReader(new InputStreamReader(System.in));//關鍵 從鍵盤讀入
?i=Integer.parseInt(br.readLine()); //關鍵 將值付給i
?System.out.println(ternary(i));
??
??
??
??
??System.out.println("請輸入值2:");
??br=new BufferedReader(new InputStreamReader(System.in)); //關鍵
??i=Integer.parseInt(br.readLine()); //關鍵
??System.out.println(alternative(i));
?
?
??//System.out.println("str1.i="+str1.i);
??//System.out.println("str2.i="+str2.i);
?}
?
}