VILL- DEBANDI, AMTA, HOWRAH PIN-711410 Phone-9836357266
9. 0+3+8+...+99
=(1²-1)+(2²-1)+(3²-1)+...+(10²-1) :—
#include<stdio.h>
int main()
{
int i,sum;
sum=0;
for(i=1;i<=10;i++)
sum=sum+i*i-1;
}
printf("%d",sum);
return 0;
No comments:
Post a Comment