Skip to content

Instantly share code, notes, and snippets.

@joaogui1
Created June 21, 2016 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joaogui1/9c323065fd60485dc2cdd3b6ec7b63e1 to your computer and use it in GitHub Desktop.
Save joaogui1/9c323065fd60485dc2cdd3b6ec7b63e1 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
int main() {
double a;
scanf("%lf", &a);
if(0<=a && a<=25.0000) printf("Intervalo [0,25]\n");
else if (25.00001<=a && a<=50.0000000) printf("Intervalo (25,50]\n");
else if (50.0000001<=a && a<=75.0000000) printf("Intervalo (50,75]\n");
else if (75.0000001<=a && a<=100.0000000) printf("Intervalo (75,100]\n");
else printf("Fora de intervalo\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment