
02/12/2007, 07:32
|
| | Fecha de Ingreso: septiembre-2007
Mensajes: 173
Antigüedad: 17 años, 5 meses Puntos: 0 | |
Re: Problemas con System.in Por si no ha quedado claro, lo pongo aquí, arreglado el tuyo.
import java.util.*;
import java.io.*;
public class Algoritmos {
public Algoritmos()
{
try
{
byte []b=new byte[0];
System.out.println("Introduzca la divisa a convertir (Y/D/E):");
InputStream p=System.in;
char divisaOrigen=(char)p.read();
System.out.println(divisaOrigen+"\r"+"perdro");
System.out.print("Introduzca la cantidad a convertir:");
p.skip(2);
char pepe= (char)p.read();
System.out.println(pepe);
}
catch (IOException eioe)
{
System.out.println("eeo22222");
}
}
public static void main (String args[])
{
new Algoritmos();
}
} |