ユーザーが入力した年がうるう年(1000〜3000)かどうかを判別します
console.log(请输入2000-2020年之间的年份
)
let inputyear = rs.question()-0;
if(inputyear> = 2000 && inputyear <= 2020){ (inputyear%4 == 0 && inputyear%100 == 0)|| inputyear%400 = = 0?Console.log():console.log(); } else { console.log()} 注:現時点では、入力を整数に制限することは考慮されていません。不足がございましたらご了承ください!!
您输入的${inputyear}是闰年
您输入的${inputyear}不是闰年
您输入的${inputyear}有误,不在2000-2020年之间