Program No : 13 :

Write a program in C to sum of first 100 numbers ?

       program no  :13
purpose : sum of first 100 numbers.

#include <"stdio.h">
void main()
{
	int loop=1,sum=0;

	 while (loop<=100)
	 {
		 sum=sum+loop;

		 loop=loop+1;
	 }

	 printf("sum= %d",sum);

}  


Back