public class ForTraduit {
  public static void main(String []args) {
    // la variable i est stockée dans la case 0
    int []memoire = new int[1000];
    int instruction = 1;
    while (true) {
      System.err.println(">>>>>>Instruction à exécuter "+instruction);
      switch (instruction) {
      case 1:
        System.out.println("Début");
        instruction++; break;
      case 2: // i=0
        memoire[0] = 0;
        instruction++; break;
      case 3: // test si i<10
        if (memoire[0]<10) instruction++;
        else instruction = 6;
        break;
      case 4: // corps de la boucle
        System.out.println("La valeur de i est "+memoire[0]);
        instruction++; break;
      case 5: // i++
        memoire[0] = memoire[0]+1;
        instruction = 3; break;
      case 6: // suite de la boucle for
        System.out.println("Fin");
        instruction++; break;
      case 7:
        System.exit(0);
      }
    }
  }
}