public class 计算
{
public static void main(String[] args){
int sum = 1;
for(int i = 2;i <= 100;i++){
if(i % 2 == 1)
sum -= i;
if(i % 2 ==0)
sum += i;
}
System.out.println(sum);
}
}
标签:....+,int,sum,args,System,void,计算,100,public
来源: https://www.cnblogs.com/874162650-com/p/15239473.html