Use if and goto. Not tested, cos I rarely use gotos:
Code:
int i=0;
:loop
printf("%d ");
i++;
if (i<10) goto loop;