Skip to content

Instantly share code, notes, and snippets.

@FelipeGrijo
Created February 24, 2017 20:20
Show Gist options
  • Save FelipeGrijo/7029e2ec1547d1c3909799b2a3d67591 to your computer and use it in GitHub Desktop.
Save FelipeGrijo/7029e2ec1547d1c3909799b2a3d67591 to your computer and use it in GitHub Desktop.
4) Entrar com um número e informar se ele é divisível por 3 e por 5.
//https://gist.github.com/FelipeGrijo
#include <stdio.h>
int main()
{
int Numero;
printf("Exercicio 4\nDigite um numero:");
//fflush(stdin);
scanf("%d",&Numero);
if(Numero % 3 == 0 && Numero % 5 == 0){
printf("%d e divisivel por 3 e 5\n",Numero);
}
else
{
printf("%d nao e divisivel por 3 e 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