Apply Now :

Find Cube Of Given Number

Monday, 12 December 2011

// C++ Program => Qube of given No.
// Calibre IT & Management Institute
// [ Krishna suman ]
#include <iostream.h>
#include <conio.h>
int cube(int x); //The prototype.

void main()
{
clrscr();
int a;
cout << "Enter an integer : ";
cin>>a;
cout << "The cube of " << a << " is : " << cube(a) << endl; //Call the function cube(a).
getch();
}
//Defining the function.
int cube(int x)
{
int y;
y=x*x*x;
return(y);
}




Share this Article on :

No comments:

Post a Comment