Write a program to calculate the sum of numbers from m to n using FOR loop.
#include < stdio.h>
int main()
{
int i, m,n, sum=0;
printf("Enter lower limit: ");
scanf("%d", &m);
printf("Enter upper limit: ");
scanf("%d", &n);
/* Find sum of all numbers */
for(i=m; i < =n; i++)
{
sum += i;
}
printf("Sum of numbers between %d and %d = %d", m, n, sum);
return 0;
}