-1
I’m starting now and wanted to know what’s wrong, the program opens, I put the values and when you click 'enter' nothing happens, please help me.
#include <stdio.h>
#include <stdlib.h>
main() {
float bc, ab, ac, a, b, c, d;
printf("\nEntre com quatro numero:\n\n");
scanf("%f %f %f %f", & a, & b, & c, & d);
bc = b - c;
if (bc < 0)
bc = bc * -1;
ab = a - b;
if (ab < 0)
ab = ab * -1;
ac = a - c;
if (ac < 0)
ac = ac * -1;
if ((bc < a && a < b + a) && (ab < b && b < a + b) && (ac < c && c < a + c))
if (a == b && b == c)
printf("\n Trinagulo \n\n");
else if (a == b || b == c || c == a)
printf("\n Triangulo isosceles\n\n");
else printf("\n Triangulo escaleno\n\n");
system("pause");
}
Could you explain the code? Why enter 4 numbers if you only use three? And what values you reported? Tried with different values? Research how to do a table test.
– Woss
Pay attention to how you create the question title. Avoid words like help please, or urgent! Moderators generally negatively ask questions with this type of title. Be straight and write the full code.
– alexjosesilva