TOPIC

Wrong Answer 20%

Wellington Levi asked 2 years ago

Em qual caso dá erro?

#include<stdio.h>
#include<math.h>
int main()
{
    long long int a,b,c,m;
    scanf("%lld %lld %lld",&a,&b,&c);
    if((abs(b-c)<a && a<(b+c) )&& (abs(a-c)<b && b<(a+c)) && (abs(b-a)<c && c<(b+a)))
    {
        if(b>a)
        {
            m=b;
            b=a;
            a=m;
        }
        if(c>a)
            {
                m=c;
                c=a;
                a=m;
            }
    if(a==b&&b==c)
        puts("Valido-Equilatero");
    else
        if(a==b || b==c)
        puts("Valido-Isoceles");
    else
        puts("Valido-Escaleno");

    if(pow(a,2)==(pow(b,2)+pow(c,2)))
        puts("Retangulo: S");
    else
        puts("Retangulo: N");
    }
   else
    puts("Invalido");
    return 0;
    }

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.