C++ Program To Find Cube Of Any Number Using Functions

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float cube(float);
float a,u;
cout<<"Enter any number:";
cin>>a;
cu=cube(a);
cout<<"nCube of "<<a<<" is "<<u;
getch();
}
float cube(float a)
{
float u;
u=a*a*a;
return(u);
}

OUTPUT:

32

Leave a Comment