Program to calculate sum of first 100 Natural Number
#include<iostream.h>
#include<conio.h>
int
main()
{
int i,sum=0;
for(i=1;i<=100;i++)
sum+=i;
cout<<"Sum ="<<sum;
getch();
return 0;
}
#include<iostream.h>
No comments :
Post a Comment