The Twelve Days of Christmas: Difference between revisions

Content added Content deleted
m (→‎{{header|11l}}: Indented multi-line string literals)
Line 3,073: Line 3,073:
</pre>
</pre>


=={{header|Mathematica}}==
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>
<lang Mathematica>daysarray = {"first", "second", "third", "fourth", "fifth", "sixth",
daysarray = {"first", "second", "third", "fourth", "fifth", "sixth",
"seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth"};
"seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth"};
giftsarray = {"And a partridge in a pear tree.", "Two turtle doves",
giftsarray = {"And a partridge in a pear tree.", "Two turtle doves",
Line 3,087: Line 3,086:
daysarray[[i]],
daysarray[[i]],
If[i == 1, "A partridge in a pear tree.",
If[i == 1, "A partridge in a pear tree.",
Row[Reverse[Take[giftsarray, i]], ","]]]], {i, 1, 12}]
Row[Reverse[Take[giftsarray, i]], ","]]]], {i, 1, 12}]</lang>
</lang>
{{out}}
{{out}}
<pre style="height:55ex;overflow:scroll">
<pre style="height:55ex;overflow:scroll">
Line 3,191: Line 3,189:
Three french hens,
Three french hens,
Two turtle doves,
Two turtle doves,
And a partridge in a pear tree.
And a partridge in a pear tree.</pre>
</pre>


=={{header|MiniScript}}==
=={{header|MiniScript}}==