Buscar

Exercício 3 ( URI 1037 )

Prévia do material em texto

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

Continue navegando