A cube calculator

  • 7
  • Locked
Let's implement a calculator that will compute the powers of numbers. To do this, create a cube() method. It must take a long integer value as an argument. The method should raise the passed value to the third power and return it as the method's result. The numbers you have to work with may be large
You can't complete this task, because you're not signed in.
Comments (4)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Krig Raseri
Level 23 , Dallas, United States
11 August, 07:36
The ^ power operator isn't a thing in Java if you did not know.
UltraGameCoder Java Developer
24 June, 11:11
Why is this considered incorrect?
x ^ 3
Anon#10923148
Level 9 , Sweden
24 January, 11:19
Long is a datatype like string and int?
Surya Singh ETL Developer at MPS Limited
20 June, 09:00
Long is Primitive Data Types data type like int. https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html#:~:text=long%3A%20The%20lon... While String is an object that represents sequence of char values.