How to convert nested loop construct into flow chart in C?
Unrelated, but
if(I != 0){
break;
}
Is implied by the for loop, you don't need it. Also be careful:
while(I=0)
will set I to 0 and your loop will never exit! You may have found this and decided to add the break later to compensate. What you want is:
while(I==0)
Note that what you did with the do while is correct, and a while loop is the same except the check happens before entering the loop rather then when exiting the loop. Remove the break and have your arrow simply go back to before the check for I == 0.