Anonymous user
Chinese zodiac: Difference between revisions
m
→{{header|UTFool}}
(add UTFool solution) |
|||
Line 1,697:
§ static
tiangan⦂ String[][]: ¤ · 10 celestial stems
¤ "甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"
¤ "jiă", "yĭ", "bĭng", "dīng", "wù", "
dizhi⦂ String[][]: ¤ · 12 terrestrial branches
¤ "子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"
¤ "zĭ", "chŏu", "yín", "măo", "chén", "sì", "
wuxing⦂ String[][]: ¤ · 5 traditional elements
Line 1,714 ⟶ 1,710:
shengxiao⦂ String[][]: ¤ · 12 animal deities
¤ "鼠", "牛", "虎", "兔", "龍", "蛇", "馬", "羊", "猴", "鸡", "狗", "豬"
¤ "shǔ", "niú", "hǔ", "tù", "lóng", "shé", "
¤ "
yinyang⦂ String[][]: ¤ · 2 fundamental principles
Line 1,727 ⟶ 1,720:
▶ main
• args⦂ String[]
for each year ∈ [1935, 1938, 1968, 1972, 1976, 1984, 1985, 1986, 2017]⦂ int
cycle⦂ int: year - 4
stem⦂ int: cycle \ 10
branch⦂ int: cycle \ 12
System.out.printf "%4s %-8s %-6s %-6s %s\n", year, tiangan[0][stem] ⊕ dizhi[0][branch],
System.out.printf "
wuxing[1][stem / 2], shengxiao[1][branch], yinyang[
System.out.printf " %-
</lang>
|