Saturday, 27 July 2013

C-Program To Find The SUM of CUBES of Natural Numbers Upto a Limit

#include<stdio.h>
main ()
{
int sum=0,n,i;
printf("Enter the Limit\t");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
sum=sum+i*i*i;
}
printf("Sum of Cubes Upto %d is %d",n,sum);
}







sakoncepts.blogspot.com
output



No comments:

Post a Comment