闰年的判别

来源:互联网 发布:明源房地产软件 编辑:程序博客网 时间:2024/04/27 13:52
闰年的判别
 
body bgcolor="#FFFFFF">
<div align="center"><font color="#FF0000"><b>闰年判别 </b></font><b></b> </div>
<%
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 & "是闰年!<br>"
else
Response.Write n&"不是闰年。<br>"
end if
end if

%>

<form method="post" action="try2.asp">
输入年份:
<input type="text" name="me" size="5">
<input type=hidden name=cal value=y>
<input type="submit" name="Submit" value="提交">
</form>

原创粉丝点击