Skip to main content
Fixed typo
Source Link

Minim, 42 37 35 Bytes

New solution halts by checking if [0] > 99.

$<42._^++[0]%10.$<10._^[0]>99.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] ==> 10099. ; Skip next stmt if index 0 is 100greater than 99 C = -1. ; Set program counter to -1 (advances to 0 afterwards) 

Old solutions halted by checking [0] == 100...

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

... or used labels and gotos.

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

GitHub Repository

Minim, 42 37 35 Bytes

New solution halts by checking if [0] > 99.

$<42._^++[0]%10.$<10._^[0]>99.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 solutions halted by checking [0] == 100...

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

... or used labels and gotos.

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

GitHub Repository

Minim, 42 37 35 Bytes

New solution halts by checking if [0] > 99.

$<42._^++[0]%10.$<10._^[0]>99.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] > 99. ; Skip next stmt if index 0 is greater than 99 C = -1. ; Set program counter to -1 (advances to 0 afterwards) 

Old solutions halted by checking [0] == 100...

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

... or used labels and gotos.

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

GitHub Repository

Saved two bytes by changing halt condition
Source Link

Minim, 42 37 3735 Bytes

New solution loopshalts by manipulating the program counter directly:checking if [0] > 99.

$<42._^++[0]%10.$<10._^[0]==100_^[0]>99.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:solutions halted by checking [0] == 100...

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

With whitespace... or used labels and comments:gotos.

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

GitHub Repository

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

Minim, 42 37 35 Bytes

New solution halts by checking if [0] > 99.

$<42._^++[0]%10.$<10._^[0]>99.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 solutions halted by checking [0] == 100...

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

... or used labels and gotos.

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

GitHub Repository

Shaved 5 bytes by using program counter instead of labels and gotos
Source Link

Minim, 4242 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

Minim, 42 Bytes

_>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

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

Source Link
Loading