Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Indicaciones:
package Problemas;
import static java.lang.Math. *;
import java.util.Scanner;
for(i=0;i<nElementos;i++){
do{
aleatorio = (int)(Math.random()*5500);
}while(aleatorio<5000||aleatorio>5500);
arreglo[i] = (int) aleatorio;
}
//Aplicando método burbuja
for(i=0;i<(nElementos-1);i++){
for(j=0;j<(nElementos-1);j++){
if(arreglo[j]>arreglo[j+1]){
aux=arreglo[j];
arreglo[j]=arreglo[j+1];
arreglo[j+1]=aux;
}
}
}
ESTADO DE CUENTA
1 999,999.99 99,999,999.99
2 999,999.99 99,999,999.99
3 999,999.99 99,999,999.99
4 999,999.99 99,999,999.99
.
.
N
package Problemas;
package Problemas;
import java.util.Scanner;
cuenta.setCuentahabiente(nombre);
do{
System.out.println("¿Que desea hacer? ");
System.out.println("OPCION 1: DEPOSITAR ");
System.out.println("OPCION 2: RETIRO ");
System.out.println("OPCION 3: SALIR ");
opcion=entrada.nextInt();
switch(opcion){
case 1:
System.out.println("¿Cuanto depositara?");
aumento = entrada.nextDouble();
cuenta.deposito(aumento);
break;
case 2:
System.out.println("¿Cuanto retirara?");
reduccion = entrada.nextDouble();
cuenta.deposito(reduccion);
break;
}
contarMovimiento++;
}while(opcion!=3);
System.out.println("\t\tESTADO DE CUENTA");
System.out.println("CUENTA HABIENTE:
"+cuenta.getCuentahabiente());
System.out.println("SALDO INCIIAL: 99999999.99");
System.out.println("MOVIMIENTO\tDEPOSITO\tRETIRO\tSALDO");
for(i=1;i<=contarMovimiento;i++){
System.out.println(i+"\t"+cuenta.movimientosDeposito[i]+"\
t"+cuenta.movimientosRetiro[i]);
}
}
}
System.out.println("¿Cuanto depositara?");
depositar = entrada.nextDouble();
cuenta.deposit(depositar);
System.out.println("¿Cuanto retirara?");
retirar = entrada.nextDouble();
cuenta.withdraw(retirar);