Skip to content

Instantly share code, notes, and snippets.

@jmramirezpro
Created February 18, 2016 11:49
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 jmramirezpro/6c377d7ebd2b9da73fc1 to your computer and use it in GitHub Desktop.
Save jmramirezpro/6c377d7ebd2b9da73fc1 to your computer and use it in GitHub Desktop.
/*
* NumeroPar.c
* Escribe un programa que lea un número entero y que muestre en la salida
* estándar si el número leído es par o impar
* Creado el 16 de feb. de 2016
* Author: jmramirez
*/
#include <stdio.h>
int main(void)
{
int numero;
printf("Escribe número entero: ");
scanf("%d",&numero);
if (numero % 2 == 0){
printf("El número introducido es PAR \n" );
}else{
printf("El número introducido es IMPAR \n" );
}
return (0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment