Ayuda por favor, código java
Publicado por Marcos (5 intervenciones) el 29/10/2019 21:09:54
Hola, tengo que hacer un menu de clientes y no anda la opcion de modificar cliente y no entiendo por que.
Alguien me puede ayudar? Dejo la opcion de registrar tambien. Gracias
Alguien me puede ayudar? Dejo la opcion de registrar tambien. Gracias
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
case 1:
System.out.println("Registro de Usuario Numero " + (cliente+1));
System.out.println("");
System.out.print("Ingrese Nombre: ");
Nombre[cliente]=in.next();
System.out.print("Ingrese Edad: ");
Edad[cliente]=in.next();
System.out.print("Ingrese Cedula de Identidad: ");
cedula[cliente]=in.next();
System.out.print("Ingrese Celular: ");
celular[cliente]=in.next();
System.out.print("Ingrese Mail: ");
mail[cliente]=in.next();
Client[cliente]= cliente + 1;
cliente++;
break;
case 2:
boolean esta=false;
int pos=0;
boolean term=false;
boolean estaba=false;
System.out.println("Modificar Cliente");
System.out.println("");
while (!term){
System.out.print("Que Cliente desea modificar? ");
int a=in.nextInt();
if(a<=100 && a>0){
while (esta=false && pos<=100){
if (a == Client[pos]){
esta=true;
System.out.print("Ingrese nuevo nombre: ");
Nombre[pos]=in.next();
System.out.print("Ingrese nueva edad: ");
Edad[pos]=in.next();
System.out.print("Ingrese nueva C.I: ");
cedula[pos]=in.next();
System.out.print("Ingrese nuevo Celular: ");
celular[pos]=in.next();
System.out.println("Ingrese nuevo Mail: ");
mail[pos]=in.next();
}
pos++;
}
term=true;
}else {System.out.println("Ingrese un número del 1 al 100");}
}
break;
Valora esta pregunta


0