... while(i<30){ // test at top of loop something(); ... }
... do { something(); } while (i<30); // test at bottom of loop ...