
vb 中如何计算已知一个月的天数?
1个回答
展开全部
dim n as integer
n=2009
if n mod 4 <> 0 then
print "这个月有28天"
else
if n mod 100 = 0 then
if n mod 400 = 0 then
print "这个月有29天"
else
print "这个月有28天"
emd if
else
"这个月有29天"
end if
end if
n=2009
if n mod 4 <> 0 then
print "这个月有28天"
else
if n mod 100 = 0 then
if n mod 400 = 0 then
print "这个月有29天"
else
print "这个月有28天"
emd if
else
"这个月有29天"
end if
end if
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询