static void Main(){
int sum_odd, sum_even;
sum_odd=0;
sum_even=0;
for(int i=1;i<=100;i++){
if(i%2==0)sum_even+=i;
else sum_odd+=i;
}
Console.WriteLine("偶数之和="+sum_even.ToString());
Console.WriteLine("奇数之和="+sum_odd.ToString());
}
int a,b;
a=0;
b=0;
for(int i=1;i<=100;i++){
if(i%2==0)a+=i;
a+=i;
}
Console.WriteLine("偶数之和="+a);
Console.WriteLine("奇数之和="+b);
Console.ReadLine();