for v_datos in alumnos_asig loop dbms_output.put_line(rpad(v_datos.fullname,15,' ')||rpad(v_datos.nota,10,' ')); case v_datos.nota when v_datos.nota<5 then suspensos:=suspensos+1; when v_datos.nota >5 and v_datos.nota < 7 then aprobados:=aprobados+1; when v_datos.nota > 7 and v_datos.nota < 9 then notables:=notables+1; when v_datos.nota = 10 then sobresa:=sobresa+1; when v_datos.nota > nota_max then nota_max:= v_datos.nota; when v_datos.nota < nota_min then nota_min:= v_datos.nota; end; end loop;