Skip to content

Instantly share code, notes, and snippets.

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