Skip to content

Instantly share code, notes, and snippets.

Created November 27, 2010 00:12
Show Gist options
  • Save anonymous/717383 to your computer and use it in GitHub Desktop.
Save anonymous/717383 to your computer and use it in GitHub Desktop.
Função Impar/Par
#include <stdio.h>
#include <stdlib.h>
int parImpar(int numero)
{
if (numero%2==0)
return 1;
else
return 0;
system("pause");
}
int ehPar;
int main()
{
int ehPar = parImpar();
printf("Eh par? %d", ehPar);
}
{
int numero1;
printf("Digite um numero inteiro:\n");
scanf("%d", &numero1);
system("pause");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment