Page 124 - Introduccion a la Programacion
P. 124

124     Introducción a la Programación





                                 preinscritos: “);
                            17.          alumnos = entrada.nextInt();
                            18.
                            19.          System.out.println(“El grupo: “ + nombre);
                            20.
                            21.          if (alumnos <= 30) {
                            22.              System.out.println(“Grupo ABIERTO”);
                            23.          } else {
                            24.              System.out.println(“Grupo CERRADO”);
                            25.          }
                            26.      }
                            27.  }




                           Resultado Java


                           Grupo Abierto



                            1.  run:
                            2.  Ingrese el nombre del grupo:
                            3.  Lis 601
                            4.  Ingrese el total de alumnos preinscritos:
                            5.  49
                            6.  El grupo: Lis 601
                            7.  Grupo ABIERTO
                            8.  BUILD SUCCESSFUL (total time: 4 seconds)



                        Grupo Cerrado
                            9.  run:
                            10.  Ingrese el nombre del grupo:
                            11.  Lis 601
                            12.  Ingrese el total de alumnos preinscritos:
                            13.  20
                            14.  El grupo: Lis 601
                            15.  Grupo CERRADO
                            16.  BUILD SUCCESSFUL (total time: 14 seconds)
   119   120   121   122   123   124   125   126   127   128   129