//100以内的奇数的和
int sum = 0;
for (int i = 1; i <= 100;i++ )
{
if(i%2!=0)
{
sum += i;
Console.Write(i+" ");
}
}
Console.WriteLine(sum);
//100以内的奇数的和
int sum = 0;
for (int i = 1; i <= 100;i++ )
{
if(i%2!=0)
{
sum += i;
Console.Write(i+" ");
}
}
Console.WriteLine(sum);