answer it plz
it is a program using 'for' loop.
inayat15:
specified what
Answers
Answered by
0
#include <stdio.h>
void main()
{
int n,i,sum;
i=1,sum=0;
printf("Enter Maximum Value(n):");
scanf("%d",&n);
while(i<=n)
{
sum=sum+i*i;
++i;
}
printf("Sum of squares of numbers from 1 to n is :%d ",sum);
}
Similar questions