Skip to content

Instantly share code, notes, and snippets.

@rogerioagjr
Last active August 29, 2015 14:19
Show Gist options
  • Save rogerioagjr/0bccc6d2a7836c50a421 to your computer and use it in GitHub Desktop.
Save rogerioagjr/0bccc6d2a7836c50a421 to your computer and use it in GitHub Desktop.
Está no limite
#include <cstdio> // scanf e printf
int main(){
int n; // declaro a variavel n
scanf("%d", &n); // leio o valor na tela e salvo em n
if(5<=n && n<=10) printf("esta no intervalo\n"); // se n estiver entre 5 e 10, imprimo que ele está no intervalo
else printf("nao esta no intervalo\n"); // se não, imprimo que ele não está no intervalo
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment