When I compile the output is 30 . I thought it would be 2 beacause z is smaller than 0 so z = z + 3 , (-1 + 3 = 2):(. I dont get it
int z = -1;
if(z < 0)
z += 3;
else if(z == 2)
z += 5;
if(z < 5)
z *= 15;
System.out.println("z is = " + z);
Aucun commentaire:
Enregistrer un commentaire