C PROGRAM TO FIND CUBE OF A NUMBER
Best C programming app is Dev c++
To find the cube of a number we have to apply the formula given below:-
[ (a*a*a) ]
The program we will write as given below:-
_____________________________
#include<stdio.h>
int main()
{
int a,cube;
printf("Enter the number:");
scanf("%d",&a);
cube=a*a*a;
printf("Cube of the number=%d",cube);
return 0;
}
_____________________________
_____________________________
OUTPUT:- Enter the number:3
Cube of the number=27
_____________________________
Thank you all -----
Follow my blog for more programming knowledge...
------------------x----------------------x-------------------------x------------------
Comments
Post a Comment