cómo puedo agregar a este código un isempty y un dibujar cuadrado?
Publicado por Lautaro Perdomo (1 intervención) el 19/11/2020 05:45:31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import java.util.Scanner;
public class proyecto{
static void Inicio(){}
public static void main(String[]args){Inicio();
Scanner leer=new Scanner(System.in);
public boolean isEmpty()
int na;
System.out.println("Ingrese la cantidad de alumnos a registrar");
na=leer.nextInt();
if (na .isEmpty());//ARREGLAR
leer.nextLine();
int i;//guarda nombre y nota del alumno
int[] notal=new int[na];
String noalumno[]=new String[na];
for(i=0;i<na;i++){do {
System.out.println("Ingrese el nombre del alumno");
noalumno[i]=leer.nextLine();
System.out.println("Ahora ingrese su nota");
notal[i]=leer.nextInt();
leer.nextLine();
}while((notal[i]<1) | (notal[i]>12));
for(i=0;i<na;i++) {System.out.println(noalumno[i]);
switch(notal[i]) {
case 1: System.out.println("");
break;}
}
}
}}
Valora esta pregunta


0