Skip to content

Instantly share code, notes, and snippets.

@FelipeGrijo
Created February 24, 2017 20:19
Show Gist options
  • Save FelipeGrijo/298a567d3351a1e51c00363ba2d22bc8 to your computer and use it in GitHub Desktop.
Save FelipeGrijo/298a567d3351a1e51c00363ba2d22bc8 to your computer and use it in GitHub Desktop.
3) Entrar com um número e informar se ele é ou não divisível por 5.
//https://gist.github.com/FelipeGrijo
#include <stdio.h>
int main()
{
int Numero;
printf("Exercicio 3\nDigite um numero:");
//fflush(stdin);
scanf("%d",&Numero);
if(Numero % 5 == 0){
printf("%d e divisivel por 5\n",Numero);
}
else
{
printf("%d nao divisivel por 5\n",Numero);
}
system("pause");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment