Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Chinese-zodiac/Maple/chinese-zodiac.maple
Normal file
8
Task/Chinese-zodiac/Maple/chinese-zodiac.maple
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
zodiac:=proc(year::integer)
|
||||
local year60,yinyang,animal,element;
|
||||
year60:= (year-3) mod 60;
|
||||
yinyang:=["Yin","Yang"];
|
||||
animal:=["Pig","Rat","Ox","Tiger","Rabbit","Dragon","Snake","Horse","Goat","Monkey","Rooster","Dog"];
|
||||
element:=["Water","Wood","Wood","Fire","Fire","Earth","Earth","Metal","Metal","Water"];
|
||||
return sprintf("%a",cat(year," is the year of the ",element[(year60 mod 10)+1]," ",animal[(year60 mod 12)+1]," (",yinyang[(year60 mod 2)+1],")"));
|
||||
end proc:
|
||||
Loading…
Add table
Add a link
Reference in a new issue