viernes, 31 de enero de 2014

Ejercicio Preparación examen 1er trimestre 1

Salida y traza de variables para:

public class Preparandoexamen1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        boolean b=true;
        int j= 10;
        while (b) {
            if (j%2==0) {
                b=true;
               
            }
            for (int i = 1; i < 10; i+=2) {
                System.out.printf("%n %d - %d", i, i+j);
            }
        }
    }
}

No hay comentarios: