Created
November 27, 2010 00:12
-
-
Save anonymous/717383 to your computer and use it in GitHub Desktop.
Função Impar/Par
This file contains 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; | |
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