Check if a number can be represented as product of two positive perfect cubes | C # program for the above approach ; Function to check if the number N can be represented as the product of two perfect cubes or not ; If cube of cube_root is N ; Otherwise , print No ; Driver Code
using System ; using System . Collections . Generic ; using System . Linq ; class GFG { public static void productOfTwoPerfectCubes ( double N ) { double cube_root ; cube_root = Math . Round ( Math . Cbrt ( N ) ) ; if ( cube_root * cube_root * cube_root == N ) { Console . Write ( " Yes " ) ; return ; } else { Console . Write ( " No " ) ; return ; } } static public void Main ( ) { double N = 216 ; productOfTwoPerfectCubes ( N ) ; } }