Perfect cube greater than a given number | Function to find the next perfect cube ; Driver Code
function nextPerfectCube ( N ) { let nextN = Math . floor ( Math . cbrt ( N ) ) + 1 ; return nextN * nextN * nextN ; } let n = 35 ; document . write ( nextPerfectCube ( n ) ) ;