#include <iostream>
using namespace std;
int Square(int); // declare that function returns
// an int and takes an int
int Cube(int);
int main()
{
cout << "The square of 27 is " << Square(27) << endl;
cout << "The cube of 27 is " << Cube(27) << endl;
return 0;
}
int Square(int n)
{
return n * n;
}
int Cube(int n)
{
return n * n * n;
}
simple right?
now I want u to make this program to receive user input. meaning, user can input any number, not just 27.
pretty simple right?