-
-
Save fsouza/717438 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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