Skip to content

Instantly share code, notes, and snippets.

@vmussak
Created April 6, 2016 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmussak/54d8ac34b66016ddac62ebcfe688aee6 to your computer and use it in GitHub Desktop.
Save vmussak/54d8ac34b66016ddac62ebcfe688aee6 to your computer and use it in GitHub Desktop.
int numero = (int)txtNumero.Text;
//se o resto da divisão do número por 2 for igual a zero, o número é par.
if(numero % 2 == 0)
{
//par
}
else
{
//impar
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment