(*______________________________________________

   Libro: EMPEZAR DE CERO A PROGRAMAR EN PASCAL
   Ejemplo (AA) 12.6.1: Calificacion segun nota
                        (Version 3) (Solucion 1)

   Web del Autor: http://www.carlospes.com
  _______________________________________________*)

program EJE12061;

uses Crt;

var Nota : Real;

begin
   ClrScr;
   GotoXY( 4, 2 );
   Write( 'Introduzca nota (real): ' );
   ReadLn( Nota );

   GotoXY( 4, 4 );
   if ( Nota >= 5 ) and ( Nota <= 10 ) then
      Write( 'APTO' )
   else

      { Inicio del anidamiento }
      if ( Nota >= 0 ) and ( Nota < 5 ) then
         Write( 'NO APTO' )
      else
         Write( 'ERROR: Nota incorrecta.' );
      { Fin del anidamiento }

end.