Nesbitt 's Inequality | C ++ code to verify Nesbitt 's Inequality ; 3 parts of the inequality sum ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; bool 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 ) ; } int main ( ) { double a = 1.0 , b = 2.0 , c = 3.0 ; if ( isValidNesbitt ( a , b , c ) ) cout << " Nesbitt ' s ▁ inequality ▁ satisfied . " << " for ▁ real ▁ numbers ▁ " << a << " , ▁ " << b << " , ▁ " << c << " STRNEWLINE " ; else cout << " Not ▁ satisfied " ; return 0 ; }