有以下程序
#include
void main( )
{
int i,s=0;
for(i=1;i<10;i+=2)
s+=i+1;
printf("%d\n",s);
}
程序运行后的输出结果是( )。
A、数1~10中的偶数之和
B、数1~9的累加和
C、数1~10的累加和
D、数1~9中的奇数之和
#include
void main( )
{
int i,s=0;
for(i=1;i<10;i+=2)
s+=i+1;
printf("%d\n",s);
}
程序运行后的输出结果是( )。
A、数1~10中的偶数之和
B、数1~9的累加和
C、数1~10的累加和
D、数1~9中的奇数之和