Advertisement

1.3.5.+ 3.5.7+ 5.7.9+.......


#include<stdio.h>
#include<conio.h>
void main()
{
int i,s,n,b;
clrscr();
s=0; b=0;
printf(“Enter the limit=”);
scanf(“%d”,&n);
for(i=1;i<=n;i=i+2)
{
b=s+i*(i+2)*(i+4);
}
printf(Result=%d”,b);
getch();
}

No comments:

Post a Comment

Please comment bellow. Share your knowledge