public class Test{
public static viod main(){
int sum=0;
for(int i=1;i<=100;i=i+2){
sum=sum+i;
}
System.out.println("1-100奇数之和为:"+sum);
}
}
public static viod main(){
int sum=0;
for(int i=1;i<=100;i=i+2){
sum=sum+i;
}
System.out.println("1-100奇数之和为:"+sum);
}
}