Skip to content

Latest commit

 

History

History

findOutWhetherTheShapeIsACube

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Find out whether the shape is a cube

8 kyu link to kata
my solution

To find the volume (centimeters cubed) of a cuboid you use the formula:

volume = Length * Width * Height

But someone forgot to use proper record keeping, so we only have the volume, and the length of a single side!

It's up to you to find out whether the cuboid has equal sides (= is a cube).

Return true if the cuboid could have equal sides, return false otherwise.

Return false for invalid numbers too (e.g volume or side is less than or equal to 0).

Note: side will be an integer