Advertisement
PROFESSOR_AIH

Interval

Mar 25th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     double a;
  5.     scanf("%lf",&a);
  6.     if(a>=0 && a<=25)
  7.         printf("Intervalo [0,25]\n");
  8.     else if(a>25 && a<=50)
  9.         printf("Intervalo (25,50]\n");
  10.     else if(a>50 && a<=75)
  11.         printf("Intervalo (50,75]\n");
  12.     else if(a>75 && a<=100)
  13.         printf("Intervalo (75,100]\n");
  14.     else
  15.         printf("Fora de intervalo\n");
  16.     return 0;
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement