TOPIC

Presentation Error (5%)

ThalissonLopes asked 2 years ago

include

int main(){

double n;

scanf("%lf", &n);

if(n >= 0 && n <= 25){ printf("Intervalo [0,25]\n"); } else{ if(n > 25 && n <= 50){ printf("Intervalo (25, 50]\n"); } else{ if(n > 50 && n < 75){ printf("Intervalo (50, 75]\n"); } else{ if(n > 75 && n <= 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.

  • Unknown11. replied 2 years ago

    #include<stdio.h>
    int main(){
    
    double n;
    
    scanf("%lf", &n);
    
    if(n >= 0 && n <= 25){ printf("Intervalo [0,25]\n"); }
    
    else{ if(n > 25 && n <= 50){ printf("Intervalo (25,50]\n"); }
    
    else{ if(n > 50 && n < 75){ printf("Intervalo (50,75]\n"); }
    
    else{ if(n > 75 && n <= 100){ printf("Intervalo (75,100]\n"); }
    
    else{ printf("Fora de intervalo\n"); } } } }
    
    return 0; }

    //you should type #include <stdio.h> in 1st lile and dont make space in Intervalo (50,75] //

  • GabrielMartins replied 2 years ago

    No printf dos intervalos, não tem espaços após a vírgula.