Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int main (){
- double n,a,b,c,d;
- scanf ("%lf", &n);
- a = 25.0000;
- b = 50.0000;
- c = 75.0000;
- d = 100.0000;
- if (a<0){
- printf ("Fora do intervalo\n");
- }
- else{
- if (n<=a){
- printf ("Intervalo [0,25]\n");
- }
- else{
- if (n<=b){
- printf ("Intervalo (25,50]\n");
- }
- else{
- if (n<=c){
- printf ("Intervalo (50,75]\n");
- }
- else{
- if(n<=d){
- printf ("Intervalo (75,100]\n");
- }
- else{
- printf ("Fora do intervalo\n");
- }
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement