Turbo C++ program to find cube of a number

#include<iostream.h>
float cube(int a);
int main()
{
 float cbe;
 int n;
 cout<<"Please enter the number ";
 cin>>n;
 cbe=cube(n);
 cout<<"The cube of the number "<<n<<"is "<<cbe;
 return 0;
}
 float cube(int a)
 {
  return a*a*a;
 }

Comments