精華區beta Visual_Basic 關於我們 聯絡資訊
※ 引述《chciya (昨天家聚好開心)》之銘言: :   可否請各位高手解題一下有關潤年的計算 :   概念大致是逢四年一潤,逢百年不潤,逢四百年又潤 :   也就是4的倍數算潤年,100的倍數不算,但400年又算潤年 :   EX:4→算,8→算,100→不算,200→不算,400→算,800→算 :   拜託有人知道的話,解一下~3Q ^^ dim yaer, a4,a100,a400 as integer year = val(text1.text) a4 = year mod 4 a100 = year mod 100 a400 = year mod 400 if a4 = 0 and a100 < > 0 or a400 = 0 then labrl3.caption = str(yaer)&"是閏年" else label3.caption = ste(year)&"不是閏年" end if end sub -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 211.74.97.128