Skip to main content
2 of 4
Shaved 5 bytes by using program counter instead of labels and gotos

Minim, 42 37 Bytes

New solution loops by manipulating the program counter directly:

$<42._^++[0]%10.$<10._^[0]==100.C=-1. 

With whitespace and comments:

$< 42. ; Print 42 as unicode '*' _^ ++[0] % 10. ; Increment index 0 and skip next stmt if index 0 mod 10 is nonzero $< 10. ; Print 10 as unicode '\n' _^ [0] == 100. ; Skip next stmt if index 0 is 100 C = -1. ; Set program counter to -1 (advances to 0 afterwards) 

Old solution used labels and gotos:

_>1.$<42._^++[0]%10.$<10._<?([0]-100)._>0. 

With whitespace and comments:

_> 1. ; Define label 1 $< 42. ; Print 42 as unicode '*' _^ ++[0] % 10. ; Pre-increment index 0, and skip next stmt if index 0 mod 10 is nonzero $< 10. ; Print 10 as unicode '\n' _< ?([0] - 100). ; Goto label 1 if index 0 ≠ 100, or label 0 otherwise _> 0. ; Define label 0 

GitHub Repository