Respuesta :

tonb
int cube(int n) { return n*n*n; }

would do the trick in C.

The method that returns a value raise to the third power is as follows;

def cube(x):

    return x**3

print(cube(3))

code explanation

The code is written in python.

  • we defined a function named "cube". This cube accepts a parameter named x. The x value is literally the length of the cube.
  • Then, we returned the x value raise to power 3. This is the volume of the cube we are to calculate.
  • Finally, we call the function with a print statement. The function accept the length of the cube.

Learn more on python here: https://brainly.com/question/17000468

#SPJ2

Ver imagen vintechnology
ACCESS MORE
ACCESS MORE
ACCESS MORE
ACCESS MORE