Smallest of three integers without comparison operators | JavaScript program to find Smallest of three integers without comparison operators ; Driver Code
function smallest ( x , y , z ) { let c = 0 ; while ( x && y && z ) { x -- ; y -- ; z -- ; c ++ ; } return c ; } let x = 12 , y = 15 , z = 5 ; document . write ( " " + smallest ( x , y , z ) ) ;