为啥错了?
#include <stdio.h>
int main()
{
int sum, num;
sum = 0;
for(num = 0;num < =10;num++ ) //for循环条件与num的变化值
{
sun+=num; //计算每次数字之间的和sum
}
printf("10以内数的和为:%d", sum);
return 0;
}
#include <stdio.h>
int main()
{
int sum, num;
sum = 0;
for(num = 0;num < =10;num++ ) //for循环条件与num的变化值
{
sun+=num; //计算每次数字之间的和sum
}
printf("10以内数的和为:%d", sum);
return 0;
}
2016-04-16
举报