Idoneal Numbers | Function to check if number is an Idoneal numbers ; iterate for all triples pairs ( a , b , c ) ; if the condition is satisfied ; Driver Code ; Function Call
function isIdoneal ( n ) { for ( var a = 1 ; a <= n ; a ++ ) { for ( var b = a + 1 ; b <= n ; b ++ ) { for ( var c = b + 1 ; c <= n ; c ++ ) { if ( a * b + b * c + c * a == n ) return false ; } } } return true ; } var N = 10 ; if ( isIdoneal ( N ) ) document . write ( " " ) ; else document . write ( " " ) ;