Wednesday, September 17, 2008

Program in c programming of SUM OF SQUARES OF THE SERIES 12+22+32+--------+n2

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();
}

No comments:

Post a Comment

Thanks to given comments.......

My Blog List