# include <stdio.h>//求1+100的值
int main ()
{
int i = 1,sum = 0;
while (i<=100)
{
sum = sum +i;
i++;
}
printf ("sum = %d",sum);
return 0;
}
# include <stdio.h>//求1+100的值
int main ()
{
int i = 1,sum = 0;
while (i<=100)
{
sum = sum +i;
i++;
}
printf ("sum = %d",sum);
return 0;
}