题目 求100以内所有偶数的和 解答 public class Zuye1OuShuHe { public static void main(String[] args) { // TODO Auto-generated method stub int a=100,b=0; while(a>0){ if(a%2==0){b=a+b;} a--;} System.out.println("100以内所有偶数的和为"+b); } }