编程计算1+3+5+……+101的值
#include <stdio.h>
void main()
{ int i, sum = 0;
for (i = 1; ; )
sum = sum + i;
printf("sum=%d\n", sum); }
i
i <= 101
i += 2
i<=101 i+2
i<=101
i=i+2
i<=101 i+=2
i < 102
i<=101 i=i+2
i<101;1+2
i+=2
i<102
i++
1.i<=101 2.i+=2
int main() {
int i,sum = 0; for(i = 1;i<=101;i=i+2){ sum = sum+i; } printf("sum = %d\n",sum); }
i≤10 i=2+i
1<=101 i+=2
i<102 i+=2
// 编程计算1+3+5+……+101的值
for (i = 1; i<=101 ; i=i+2 )
#include void main() { int i, sum = 0; for (i = 1; i<=101 ; i=i+2; ) sum = sum + i; printf("sum=%d\n", sum); }
i<=101 i++
王泽茂 回复 王泽茂: 是i+2,没注意看题
Nature 回复 王泽茂: 应该是i+=2哦
i<=101;i++
i<102 i+2
i <= 102 i +=2
i <= 101 i +=2
薄冰百天,我要上西南交通大鞋
i<=101 i++
(i%2==1)&&i<=101
i <= 101 i+=2
i<= 99 i+=2
for (i = 1;i<102;i+=2)
#include <stdio.h> void main() { int i, sum = 0; for (i = 1; i <= 101 ; i += 2 ) sum = sum + i; printf("sum=%d\n", sum); }
i<=101;i+=2
i < =101
i = i+2
i<101,i++
for (i = 1; i<=101;i+=2)
printf("sum=%d\n", sum); return 0; }
for (i = 1; i<=101;i++)
i <= 101 i += 2
18827430470 回复 18827430470: i=i+2
我有我的名字 回复 我有我的名字: 靠,没认真审题
i<=101 I+=2
#include <stdi...
用户登录可进行刷题及查看答案
for (i = 1; i<=101 ; i=i+2; )
登录后提交答案