Coding-
#include<stdio.h>
#include<conio.h>
void main()
{
int a,n,i=0;
clrscr()
printf("enter the terms=");
scanf("%d",&n);
while(i<=n)
{
a=i*i*i;
i++;
}
printf("cube value=%d",a);
getch();
}
OUTPUT-
Enter the terms=4
cube value=64
#include<stdio.h>
#include<conio.h>
void main()
{
int a,n,i=0;
clrscr()
printf("enter the terms=");
scanf("%d",&n);
while(i<=n)
{
a=i*i*i;
i++;
}
printf("cube value=%d",a);
getch();
}
OUTPUT-
Enter the terms=4
cube value=64
Comments
Post a Comment
Please Subscribe and Comments my blog site.