{ int sum = 0; //求和 for(int i =1;i<=100;i++){ if(i%3!=0){ sum=sum+i; } } System.out.println("和是:"+sum); }

相关文章: