日期:2014-05-18 浏览次数:20660 次
public static void main(String[] args){
int result = 0;
for(int i = 0;i < 50;i ++){
int tmp = 2 * i + 1;
result += tmp;
}
System.out.println("result :" + result);
}
public int count(){
int result = 0;
for(int i = 0; i < 100; i++){
if(i%2>0){
System.out.println(i);
result += i;
}
}
return result;
}