TOPIC

Wa 10% - Preciso de ajuda

Uriel asked 1 year ago

#include<stdio.h>
#include<math.h>

int main()
{
    int d, vf, vg, c=12;
    double tf, tg, raiz, vg2;

    while(scanf("%d%d%d", &d, &vf, &vg)!=EOF)
    {
        vg2=vg;
        raiz = sqrt((144+(d*d)));
        tf = c/vf;
        tg= (raiz/vg2);

        if(tg<=tf){
            printf("S\n");
        }
        else{
            printf("N\n");
        }
    }
return 0;
}

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

  • Fernando Caique replied 1 year ago

    as variaveis c e vf são inteiros. faça o casting antes da divisão ou apenas 12.0 no lugar da variavel c