TOPIC

Wrong answer (10%)

vnzsantos asked 3 years ago

Olá, estou recebendo Wrong answer (10%), ja testei varias possibilidades e o código ta certo.

Alguem consegue me ajudar?

include

using namespace std;

int main() {

double x;

scanf("%lf", &x);

if(x > 0 && x <= 25){
    printf("Intervalo [0,25]\n");
}else if(x > 25 && x <= 50){
    printf("Intervalo (25,50]\n");
}else if(x > 50 && x <= 75){
    printf("Intervalo (50,75]\n");
}else if(x > 75 && x <= 100){
    printf("Intervalo (75,100]\n");
}else{
    printf("Fora de intervalo\n");
}

return 0;

}

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

  • definitelynotmee replied 3 years ago

    Então, caso o número seja 0 era pro código entrar no "Intervalo [0,25]\n", mas ele cai no fora de intervalo. Fiz isso e deu accepted. Abraços