Write a program to find the sum of first five number’s cube.

#include<conio.h>
#include<stdio.h>
int main()
{
int i=1,ans=0;
while(i<=5)
{
ans=ans+(i*i*i);
i++;
}
printf("\nThe ans is: %d",ans);
}

No comments:

Post a Comment