Java!宿題!
■ このスレッドは過去ログ倉庫に格納されています
0334デフォルトの名無しさん
NGNGimport java.text.*;
public class Test
{
public static void main(String[] args){
try{
long l = Long.parseLong(args[0]);
Format f = new DecimalFormat("#,###");
System.out.println(f.format(l));
for(int i=1; i<args.length; i++){
f = new DecimalFormat(args[i]);
System.out.println(f.format(l));
}
}
catch(ArrayIndexOutOfBoundsException ex){
System.out.println("値入れれ");
}
catch(NumberFormatException ex){
System.out.println("変なの入れるな");
}
}
}
長いのはむりぽ。
■ このスレッドは過去ログ倉庫に格納されています