JAVADAW24 / U1-Hoja-2-EJERCICIO-1

Programa ciclico JAVA con operadores INCREMENTO++ y --DECRESCENDO (>)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EJERCICIO-1-Hoja-2

Programa ciclico JAVA con operadores INCREMENTO++ y --DECRESCENDO (>)

   /*
   📌 EJERCICIO 1, Hoja 2. 
   🔴 ¿Qué valor tendrán las variables X e Y después de ejecutar las instrucciones?:
   */
   
    public class Ejercicio1_Hoja2 {
    public static void main(String[] args) {
    int x=100;
    int x1=(x++); 
    int y=20; 
    int y2=(y--);
    int total= x += y; 
    System.out.println("\n\tValor TOTAL: "+total); 
         System.out.println("\n - valor FINAL de x: "+x);
         System.out.println(" - valor FINAL de y: "+y+"\n");
    }
}

EJERCICIO-1-Hoja-2

About

Programa ciclico JAVA con operadores INCREMENTO++ y --DECRESCENDO (>)


Languages

Language:Java 100.0%