Jump to content

Chinese zodiac: Difference between revisions

m
(add UTFool solution)
Line 1,697:
§ static
tiangan⦂ String[][]: ¤ · 10 celestial stems
¤ "甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"
¤ "jiă", "yĭ", "bĭng", "dīng", "wù", "", "gēng", "xīn", "rén", "gŭi"
¤ "jiă", "yĭ", "bĭng", "dīng", "wù"
"jĭ", "gēng", "xīn", "rén", "gŭi"
dizhi⦂ String[][]: ¤ · 12 terrestrial branches
¤ "子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"
¤ "zĭ", "chŏu", "yín", "măo", "chén", "sì", "", "wèi", "shēn", "yŏu", "", "hài"
¤ "zĭ", "chŏu", "yín", "măo", "chén", "sì"
"wŭ", "wèi", "shēn", "yŏu", "xū", "hài"
wuxing⦂ String[][]: ¤ · 5 traditional elements
Line 1,714 ⟶ 1,710:
shengxiao⦂ String[][]: ¤ · 12 animal deities
¤ "鼠", "牛", "虎", "兔", "龍", "蛇", "馬", "羊", "猴", "鸡", "狗", "豬"
¤ "shǔ", "niú", "hǔ", "tù", "lóng", "shé", "", "yáng", "hóu", "", "gǒu", "zhū"
¤ "shǔrat", "niúox", "tiger", "rabbit", "lóngdragon", "shésnake", "horse", "goat", "monkey", "rooster", "dog", "pig"
"mǎ", "yáng", "hóu", "jī", "gǒu", "zhū"
¤ "rat", "ox", "tiger", "rabbit", "dragon", "snake"
"horse", "goat", "monkey", "rooster", "dog", "pig"
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
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],
year, tianganwuxing[0][stem] / dizhi2], shengxiao[0][branch], yinyang[0][year \ 2]
System.out.printf " wuxing %-9s %-7s %-7s %s\n", tiangan[01][stem / 2], shengxiao⊕ dizhi[01][branch],
wuxing[1][stem / 2], shengxiao[1][branch], yinyang[01][year \ 2]
System.out.printf " %-9s2s/60 %-7s %-7s %s\n\n", cycle \ 60 + 1,
tianganwuxing[12][stem] / dizhi2], shengxiao[12][branch],
wuxing[1][stem / 2], shengxiao[1][branch],
yinyang[1][year \ 2]
System.out.printf " %-2s/60 %-7s %s\n\n",
cycle \ 60 + 1, wuxing[2][stem / 2],
shengxiao[2][branch]
</lang>
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.