public class ProgSimpleAlternativeTraduit { public static int insCourante; public static int []memoire = new int[1000]; // x : 0 // y : 1 public static void main(String []args) { insCourante = 1; while (true) { System.err.println("ins="+insCourante); switch(insCourante) { case 1: memoire[0] = 62; insCourante += 1; break; case 2: if (memoire[0]<50) { insCourante = 5; } else { insCourante = 3; } break; case 3: memoire[1] = 222; insCourante += 1; break; case 4: System.out.println("y="+memoire[1]); insCourante = 6; break; case 5: memoire[1] = 111; insCourante = 4; break; case 6: System.exit(0); } } } }