Learn Programming
Thursday, February 2, 2012
SUM OF SQUARES OF THE SERIES 12+22+32+--------+n2
#include<stdio.h>
#include<conio.h>
void main()
{
long int r;
clrscr();
printf("\nEnter the range: ");
scanf("%ld",&r);
printf("\nSum of the squares of the series is: %ld",((r*(r+1))*(2*r+1))/6);
getch();
}
2 comments:
Unknown
January 26, 2022 at 9:23 PM
55
Reply
Delete
Replies
Reply
Unknown
January 26, 2022 at 9:23 PM
Hi
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
55
ReplyDeleteHi
ReplyDelete