Skip to content

Instantly share code, notes, and snippets.

@FelipeGrijo
Created February 24, 2017 20:21
Show Gist options
  • Save FelipeGrijo/c788c8ee04fea7158056b20083b3b878 to your computer and use it in GitHub Desktop.
Save FelipeGrijo/c788c8ee04fea7158056b20083b3b878 to your computer and use it in GitHub Desktop.
5) Construir um algoritmo que indique se o número digitado está compreendido entre 20 e 90 ou não.
//https://gist.github.com/FelipeGrijo
#include <stdio.h>
int main()
{
int Numero;
printf("Exercicio 5\nDigite um numero:");
//fflush(stdin);
scanf("%d",&Numero);
if(Numero > 20 && Numero < 90){
printf("%d esta entre 20 e 90\n",Numero);
}
else
{
printf("%d nao nao esta entre 20 e 90\n",Numero);
}
system("pause");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment