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