Nesbitt 's Inequality | Java code to verify Nesbitt 's Inequality ; 3 parts of the inequality sum ; Driver code
class GFG { static boolean isValidNesbitt ( double a , double b , double c ) { double A = a / ( b + c ) ; double B = b / ( a + c ) ; double C = c / ( a + b ) ; double inequality = A + B + C ; return ( inequality >= 1.5 ) ; } public static void main ( String args [ ] ) { double a = 1.0 , b = 2.0 , c = 3.0 ; if ( isValidNesbitt ( a , b , c ) == true ) { System . out . print ( " Nesbitt ' s ▁ inequality " + " ▁ satisfied . " ) ; System . out . println ( " for ▁ real ▁ numbers ▁ " + a + " , ▁ " + b + " , ▁ " + c ) ; } else System . out . println ( " Nesbitts ▁ inequality " + " ▁ not ▁ satisfied " ) ; } }