Ejercicio02.java 447 Bytes
Newer Older
Silvia Barrientos committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
public class Ejercicio02 {
    public static void main(String[] args) {
        int valor1 = 1;
        int valor2 = 1;
        comparacion(valor1, valor2);
    }

    
    public static void comparacion(int val1, int val2){

        if(val1 < val2) System.out.printf("\n%d < %d\n", val1, val2);
        if(val1 > val2) System.out.printf("\n%d > %d\n", val1, val2);
        if(val1 == val2) System.out.printf("\n%d == %d\n", val1, val2);
    }

}