#include <math.h> #include <stdio.h> int main() { /* Vérifier si a, b, et c peuvent être les 3 côtés d'un triangle*/ double a, b, c, temp; if ( isgreater( a, b ) ) { temp = a; a = b; b = temp; } if ( isgreater( a, c ) ) temp = a; a = c; c = temp; if ( isgreaterequal( a, b + c ) ) printf( "Le trois nombres %.2lf, %.2lf, et %.2lf " "ne sont pas les 3 côtés d'un triangle.n", a, b, c ); return 0; } |
----------------------------------------------------------------------------