Check if a given number is Pronic | function to check Pronic Number ; Checking Pronic Number by multiplying consecutive numbers ; Printing Pronic Numbers upto 200
function checkPronic ( x ) { for ( var i = 0 ; i <= parseInt ( Math . sqrt ( x ) ) ; i ++ ) if ( x == i * ( i + 1 ) ) return true ; return false ; } for ( var i = 0 ; i <= 200 ; i ++ ) if ( checkPronic ( i ) ) document . write ( i + " " ) ;