- public class jva106
- {
- public static void main(String arg[])
- {
- int tot=0;
- int isn=0;
- int non=0;
- for(int i=0;i<arg.length;i++)
- {
- try{
- tot=tot+Integer.parseInt(arg[i]);
- isn++;
- }catch(Exception e){
- non++;
- }
- }
- System.out.println("數值之總和為:"+tot);
- System.out.println("非數值個數為:"+non);
- System.out.println("純數之個數為:"+isn);
-
- }
- }
複製代碼 救命!!!!!!!!為什麼不能執行      ) ?9 S' o, G. D, {( z
阿阿阿阿阿阿阿阿阿阿阿阿  |