Leandro Vieira Pinho´s Blog

Just another WordPress weblog

Main menu

Skip to primary content
Skip to secondary content
  • Sobre
  • Projetos
  • Contato

Monthly Archives: June 2007

É ímpar ou par? Confira facilmente usando o PHP

Posted on June 1, 2007 by leandro

Utilizando o seguinte código:

$status = (1 & $number) ? 'Ímpar' : 'Par';

Verificamos se o número informado é ímpar ou par, simples ou não?

Leia o original Odd and Even Numbers

Posted in php | Tagged php
pharmatabs.net
Proudly powered by WordPress