cow programming language

Solutions on MaxInterview for cow programming language by the best coders in the world

showing results for - "cow programming language"
Claudio
27 Jul 2017
1OOO
2MOo
3mOO
4
Rodrigo
09 Jan 2017
1[[ copy current to temp block ]]
2MMM
3moO
4MMM
5[[ copy 3 into another new temp block ]]
6moO
7OOO
8MoO
9MoO
10MoO
11[[ loop 3 times (the 3 is still current) ]]
12[[  this also decrements the temp value ]]
13MOO
14MOo
15mOo
16MOo
17moO
18moo
19[[ move back to first temp value (the copy of the current value) and check if 0 ]]
20mOo
21MOO
22[[ make original current current again ]]
23mOo
24OOM
25[[ gets here if != 3 ]]
26[[ skip down to the bottom past the if ]]
27moO
28OOO
29MOO
30moo
31[[ make original current current again ]]
32mOo
33OOM
34[[ gets here if == 3 ]]
35[[ skip down to the bottom of the if ]]
36moO
37OOO
38MOO
39moo
40moo
41[[ set current back ]]
42mOo
43[[ all execution resumes here ]]
44