C/C++: Vérifier si un nombre est pair ou nom

Author:


Download

#include 

int main(void)
{
  int i;

  printf("Tapez un nombre: ");
  scanf("%d", &i);

  if( ( i % 2 ) == 0)
      printf("Nombre pair");
  if( ( i % 2 ) ==1)
      printf("Nombre Impair");

  return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *