asp判断闰年程序代码

来源:百度文库 编辑:神马文学网 时间:2024/04/28 13:46:20
如何判别闰年
 
    闰年判别 
 
 
<% 
    if Request.Form("cal")="y" then 
        n=Cint(Request.form("me")) 
        if ((n mod 4=0) and (n mod 100<>0)) or (n mod 400=0) then 
            Response.Write n & "是闰年! 
            " 
        else 
            Response.Write n&"不是闰年。 
            " 
        end if 
    end if 
%> 
     
        输入年份: