Here is the Program to enter an integer and output the cube of that integer. Its simple program work best on DEV C++. This program takes in an integer a as a screen input from the user. It then determines the integer's cube and outputs it using the 'cout' command
Program to find the cube of the given integer
using namespace std;
int cube(int x); //The prototype.
cout << "Enter an integer : ";
cout << "The cube of " << a << " is : " << cube(a) << endl; //Call the function cube(a).
//Defining the function.
int cube(int x)
Here is the Output:
Don't forget to share this on facebook and twitter and with every one else.
Thank you for reading this post. Ask your questions in comment section.