Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Saturday, January 23, 2010

Write a program in c to find the sum s = 1*2 + 2*3 + 3*4 + 4*5 + .... + 10*11



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i, s;
s = 0;
for (i=1; i < = 10; i++)
{
s = s + i * (i++);
}
printf("\n The sum is %d \n", s);
return(0);
}

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP