1 /*C How to Program, 6/E, Deitel & Deitel.
3 Solution of exercise 3.44:
4 (Sides of a Triangle) Write a program that reads three nonzero float values
5 and determines and prints if they could represent the sides of a triangle.
7 Modified by Juan Carlos Moreno (jcmhsoftware@gmail.com), 2023-03-21.*/
13 /*The nonzero float values*/
18 /*Enter the three nonzero float values*/
19 printf("Enter the first integer: ");
20 scanf("%f",&first_value
);
21 printf("Enter the second integer: ");
22 scanf("%f", &second_value
);
23 printf("Enter the third integer: ");
24 scanf("%f", &third_value
);
26 if ((first_value
+ second_value
> third_value
) &&
27 (first_value
+ third_value
> second_value
) &&
28 (second_value
+ third_value
> first_value
))
30 printf("The values could represent the sides of a triangle.\n");
34 printf("The values could no represent the sides of a triangle.\n");