/*_____________________________________________________

   Libro: EMPEZAR DE CERO A PROGRAMAR EN LENGUAJE C
   Ejercicio Resuelto 12.6: Número cercano al 1 ó al 0
   
   Web del Autor: http://www.carlospes.com
  _____________________________________________________*/

#include <stdio.h>

int main()
{
   float numero;

   printf( "\n   Introduzca un numero real: " );
   scanf( "%f", &numero );

   if ( numero > 0.5 )
      printf( "\n   Esta mas cercano al 1" );
   else

      if ( numero < 0.5 )
         printf( "\n   Esta mas cercano al 0" );
      else
         printf( "\n   Esta en medio" );

   return 0;
}
