Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/11/2007, 11:51
dieguito01
 
Fecha de Ingreso: abril-2007
Mensajes: 77
Antigüedad: 18 años
Puntos: 0
Re: Examen de java!!!!AyUDA

1) Lo único que hace es restarle 2 al numero hasta que sea 0

Creo qe asi esta bien.

Código:
public class Ejercicio1 {

	public static void main(String[] args)
	{
		int numero = System.in.read();
		
		while (numero>0)
		{
			System.out.print(numero + " + ");
			numero = numero - 2;
		}

	}
}