Created
February 24, 2017 20:17
-
-
Save FelipeGrijo/5f86b6b337d4886394a99cacf8fa924a to your computer and use it in GitHub Desktop.
2) Entrar com um número e imprimir uma das mensagens: par ou ímpar.
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
//https://gist.github.com/FelipeGrijo | |
#include <stdio.h> | |
int main() | |
{ | |
int Numero; | |
printf("Exercicio 2\nDigite um numero:"); | |
//fflush(stdin); | |
scanf("%d",&Numero); | |
if(Numero % 2 == 0){ | |
printf("%d - Par\n",Numero); | |
} | |
else | |
{ | |
printf("%d - Impar\n",Numero); | |
} | |
system("pause"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment