确定一年是否是闰年 [英] Determining if a year is a leap year

查看:83
本文介绍了确定一年是否是闰年的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对,我要写一个小脚本来检查一年是不是一年。我明白


a)年份或数字除以400,100和4时,应该给我一个模块余数为0,对吗?


所以,如果我上面说的是对的..........我写了这个剧本......现在我确定这可能是完全错误的,但是我'对所有这些都有点新鲜......


脚本被解析为html for .........

展开 | 选择 | Wrap | 行号

解决方案

如果没有结束'')'''

[PHP] if(


leap ==((


x%100)== 0 || (

right, i''ve to write a small script to check if a year is leapyear or not. i understand that

a) the year or number when divided by 400, 100 and 4, should leave me with a module remainder of 0, correct?

so, if what i''ve said above is right.......... i wrote this script...... now i''m sure this is probably completly wrong, but i''m a bit new to all this.....

the script is being parsed to a html for by the way.........

Expand|Select|Wrap|Line Numbers

解决方案

You are missing ending '')'' in if
[PHP]if (


leap == ((


x%100) == 0 || (


这篇关于确定一年是否是闰年的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆