#include<stdio.h>
#include<conio.h>
main()
{
int n,i=0,sum=0;
printf("Enter Limit : ");
scanf("%d",&n);
while(i<n)
{
i++;
sum+=i;
}
printf("Sum of %d natural numbers = %d",n,sum);
}
OUTPUT:
Enter Limit : 10 Sum of 10 natural numbers = 55