viernes, 23 de marzo de 2012

CLASE DemoOrdenamiento



import java.io.*;
import java.util.Scanner;
public class DemoOrdenamiento
{ public static void main(String []args)
{
Ordenamiento datos=new Ordenamiento();
int sw,opcion;


datos.ingreso();
sw=1;
do{


System.out.println("0. Salir");
System.out.println("1. Inserción(menor a mayor)");
System.out.println("2. Inserción(mayor a menor)");
System.out.println("cualquier número distinto al menú te regresará al mismo");
System.out.print("Opcion a elegir");
opcion=leer.datoInt();

switch(opcion)
{
case 0: sw=0;break;
case 1: datos.baraja();break;
case 2: datos.baraja2();break;
}
if(opcion==1)
{
System.out.println("Arreglo despues de ordenar");
datos.reporte();
}


if(opcion==2)
{
System.out.println("Arreglo despues de ordenar");
datos.reporte();
}
}while(sw==1);


}}

No hay comentarios:

Publicar un comentario