title: fortran77 do continue loops confused
body: <p>I'm trying to translate a fortran program to a c++ version, and then I found such code:</p>
  
  <pre><code>100 DO 120 I=2,7
      DO 110 J=1,3
      IF(IU(J)/I*I-IU(J))120,110,120
  110 CONTINUE
      GO TO 130
  120 CONTINUE
      GO TO 150
  130 DO 140 J=1,3
  140 IU(J)=IU(J)/I
      GO TO 100
  150 CONTINUE
      END
  </code></pre>
  
  <p>And <code>END</code> is the end. </p>
  
  <p>My c++ verison is:</p>
  
  <pre><code>bool flag=true;
  
  while(flag){
      flag=false;
      for (int i = 2; i &lt;= 7; i++) {
          for (int j = 0; j &lt; 3; j++) {
              if ((IU[j]/i*i==IU[j])) {
                  flag=true; break;
              }
              else {
                  continue;
              }
          }
          if (!flag) {
              break;
          }
          else {
              for (int j = 0; j &lt; 3; j++) {
                  IU[j]=IU[j]/i;
              }
          }
      }
  }
  </code></pre>
  
  <p>I'm sure that it is wrong, but could not figure out the correct one. So how to translate the fortran code to c++?</p>