标签:main ring ++ i++ while sys double print single
public static void main(String args[]){
int doubleNumber = 0;
int singleNumber = 0;
int i =1;
while(i <= 50){
if(i %2==0){
doubleNumber+=i;
}else{
singNumber+=i;
}
i++;
}
System.out.println(doubeNumber);
System.out.println(singleNumber);
}
标签:main ring ++ i++ while sys double print single
原文地址:http://www.cnblogs.com/chenligeng/p/7612574.html