Advertisement
Hameem

Untitled

Oct 22nd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 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. {
  8. printf("Intervalo [0,25]\n");
  9. }
  10. else if(a>=25.01 && a<=50)
  11. {
  12. printf("Intervalo (25,50]\n");
  13. }
  14. else if(a>=50.01 && a<=75)
  15. {
  16. printf("Intervalo (50,75]\n");
  17. }
  18. else if(a>=75.01 && a<=100)
  19. {
  20. printf("Intervalo (75,100]\n");
  21. }
  22. else if(a<0 || a>100)
  23. {
  24. printf("Fora de intervalo\n");
  25. }
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement