Java
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package numeroenterope;
import java.io.*;
/**
*
* @author E04
*/
public classNumeroEnteroPE {
static InputStreamReader isr = new InputStreamReader(System.in);
static BufferedReader teclado = new BufferedReader(isr);
static String linea;
/**
* @paramargs the command line arguments
*/
public static void main(String[] args) throws IOException {
// TODO code application logic here
int opcion;
int num;do{
System.out.println("TECLEA UN NUMERO ENTERO");
linea = teclado.readLine();
num=Integer.parseInt(linea);
System.out.println("MENU PRINCIPAL");System.out.println("1.-Obtener uninidades");
System.out.println("2.-Obtener decenas");
System.out.println("3.-Obtener centenas");System.out.println("4.-Obtener millares");
System.out.println("9.-Salir");
System.out.println("TECLEA UNA OPCION");
linea = teclado.readLine();
opcion=Integer.parseInt(linea);switch(opcion)
{
case 1:
System.out.println("Obteniendo UNIDADES...:");
System.out.println("Unidades="+obtenerUnidades(num));break;
case 2:
System.out.println("Obteniendo DECENAS...:");
System.out.println("Decenas="+obtenerDecenas(num));break;
case 3:
System.out.println("Obteniendo CENTENAS...:");
System.out.println("Centenas="+obtenerCentenas(num));
break;case 4:
System.out.println("Obteniendo MILLARES...");
System.out.println("Millares="+obtenerMillares(num));
break;
case 9:...
Regístrate para leer el documento completo.