为啥输出是个天文数字
#include <stdio.h>
int main()
{
int i,sum = 0;
i = 1;
while(i<=100)
{
sum =sum+i;
i += 1;
}
printf("100以内所有整数之和为:%d\n","sum");
return 0;
}
#include <stdio.h>
int main()
{
int i,sum = 0;
i = 1;
while(i<=100)
{
sum =sum+i;
i += 1;
}
printf("100以内所有整数之和为:%d\n","sum");
return 0;
}
2020-02-24
举报