题目:求s = 1 + 2 + 3 + ... + 100的值
#include <stdio.h>
int main()
{
int i = 0;
int s = 0;
for (i = 1; i <= 100; i++)
{
s =s+i;
}
printf("%d", s);
return 0;
}
题目:求s = 1 + 2 + 3 + ... + 100的值
#include <stdio.h>
int main()
{
int i = 0;
int s = 0;
for (i = 1; i <= 100; i++)
{
s =s+i;
}
printf("%d", s);
return 0;
}