x=1 y=2*sum*=3
10Squared is : 100
2
a=+00325 x=+3.141593e+000
3
c='K
4
a=12,b=345
#include "stdio.h"main()
{
int i, odd = 0, even = 0
for (i = 100i <= 300i++)
{
if (i % 2 == 0)//是偶数
even = even + i
else// 是奇数
odd = odd + i
}
printf("100~300的奇数之和为:%d\n", odd)
printf("100~300的偶数之和为:%d\n", even)
}
// 已经解决您的问题,别忘加分哦:)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)