convert for loop into while and do..while | Go4Expert
int i=1,j=1; do { printf ("%i",i); i++; do { printf ("\n"); j++; }while (j<=i); }while (i<=5); philay, Dec 13, 2007 SHARE #6 shabbir Administrator Staff Member Joined: Jul 12, 2004 Messages: 15,369 Likes Received: 386 Trophy Points: 83 For while loop you should increment the counter as the last statement and then it will be equivalent.