[填空題] 本程序的功能是,按"年/月/日"格式輸入日期,計(jì)算出該日期是該年份中的第幾天,過(guò)程leap_year用于判斷該年份是否為閏年(能被4整除且不能被10
[填空題] 本程序的功能是,按"年/月/日"格式輸入日期,計(jì)算出該日期是該年份中的第幾天,過(guò)程leap_year用于判斷該年份是否為閏年(能被4整除且不能被100整除或能被400整除的年份為閏年)。Private Sub Commandl_Click()Dim st As String,rq(3)As Integeb k As Integer,d As IntegerDim p As String*1,q As String,i As Integer,dt As Integerst=Trim(Text1)i=1Dop=Mid(st,i,1)If p"/" Thenq=q & pElsek=k+1rq(k)=Val(q)()End Ifi=()Loop Until i>Len(st)k=k+1rq(k)=qFor i=() To 1 Step -1Select Case iCase 1,3,5,7,8,10dt=31Case 2If leap_year(rq(1))Thendt=29Elsedt=28End IfCase Elsedt=30End Selectd= ()Next iText2=d+rq(3)End SubPrivate Function leap_year(n As Integer)As BooleanIf?() Thenleap_year=TrueElseIf n Mod 400=0 Thenleap_year=TrueEnd IfEnd Function
正確答案:q="";i+1;rq(2)-1;d+dt;n mod 4=0 and n mod 1000
詞條內(nèi)容僅供參考,如果您需要解決具體問(wèn)題
(尤其在法律、醫(yī)學(xué)等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。