Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Input #1, y Y1 = "猴雞狗豬鼠牛虎兔龍蛇馬羊" Y2 = "庚辛壬癸甲乙丙丁戊己" y3 = "申酉戌亥子丑寅卯辰巳午未" a = y Mod 12 b = y Mod 10 Print #2, Mid(Y1, a + 1, 1) & Mid(Y2, b + 1, 1) & Mid(y3, a + 1, 1) Close Close End End Sub
Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Input #1, n a1 = Split("猴 雞 狗 豬 鼠 牛 虎 兔 龍 蛇 馬 羊") a2 = Split("庚 辛 壬 癸 甲 乙 丙 丁 戊 己") a3 = Split("申 酉 戌 亥 子 丑 寅 卯 辰 巳 午 未") a = n Mod 12 b = n Mod 10 Print #2, a1(a) & a2(b) & a3(a) Close Close End End Sub
Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 a = Split("庚 辛 壬 癸 甲 乙 丙 丁 戊 己") b = Split("申 酉 戌 亥 子 丑 寅 卯 辰 巳 午 未") c = Split("猴 雞 狗 豬 鼠 牛 虎 兔 龍 蛇 馬 羊 ") Input #1, n x = n Mod 10 y = n Mod 12 Print #2, c(y) & a(x) & b(y) Close #2 Close #1 End End Sub
Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Input #1, x a = Split("猴 雞 狗 豬 鼠 牛 虎 兔 龍 蛇 馬 羊") b = Split("庚 辛 壬 癸 甲 乙 丙 丁 戊 己 ") c = Split("申 酉 戌 亥 子 丑 寅 卯 辰 巳 午 未") N1 = Val(x) Mod 12 N2 = Val(x) Mod 10 Print #2, a(N1) & b(N2) & c(N1) Close #2 Close #1 End End Sub
Private Sub Form_Load()
回覆刪除Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Input #1, y
Y1 = "猴雞狗豬鼠牛虎兔龍蛇馬羊"
Y2 = "庚辛壬癸甲乙丙丁戊己"
y3 = "申酉戌亥子丑寅卯辰巳午未"
a = y Mod 12
b = y Mod 10
Print #2, Mid(Y1, a + 1, 1) & Mid(Y2, b + 1, 1) & Mid(y3, a + 1, 1)
Close
Close
End
End Sub
Private Sub Form_Load()
回覆刪除Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Input #1, n
a1 = Split("猴 雞 狗 豬 鼠 牛 虎 兔 龍 蛇 馬 羊")
a2 = Split("庚 辛 壬 癸 甲 乙 丙 丁 戊 己")
a3 = Split("申 酉 戌 亥 子 丑 寅 卯 辰 巳 午 未")
a = n Mod 12
b = n Mod 10
Print #2, a1(a) & a2(b) & a3(a)
Close
Close
End
End Sub
Private Sub Form_Load()
回覆刪除Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
a = Split("庚 辛 壬 癸 甲 乙 丙 丁 戊 己")
b = Split("申 酉 戌 亥 子 丑 寅 卯 辰 巳 午 未")
c = Split("猴 雞 狗 豬 鼠 牛 虎 兔 龍 蛇 馬 羊 ")
Input #1, n
x = n Mod 10
y = n Mod 12
Print #2, c(y) & a(x) & b(y)
Close #2
Close #1
End
End Sub
三個程式正確
回覆刪除Private Sub Form_Load()
回覆刪除Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Input #1, x
a = Split("猴 雞 狗 豬 鼠 牛 虎 兔 龍 蛇 馬 羊")
b = Split("庚 辛 壬 癸 甲 乙 丙 丁 戊 己 ")
c = Split("申 酉 戌 亥 子 丑 寅 卯 辰 巳 午 未")
N1 = Val(x) Mod 12
N2 = Val(x) Mod 10
Print #2, a(N1) & b(N2) & c(N1)
Close #2
Close #1
End
End Sub