原文:用JS寫,根據用戶輸入的年月份判斷是這年的第幾天

console.log 輸入年份: let year readline.question console.log 輸入一個月份 let month readline.question console.log 輸入天數 let day readline.question if year gt amp amp year lt if month gt amp amp month lt if day g ...

2018-05-19 12:52 0 1035 推薦指數:

查看詳情

Python輸入年月日,判斷這一天是這一第幾天

1. 【問題描述】 輸入某年某月某日,判斷這一天是這一第幾天?程序分析:以3月5日為例,應該先把前兩個月的加起來,然后再加上5天即本年的第幾天。特殊情況:閏年且輸入月份大於3時需考慮多加一天。 提示:(1) 閏年的2月有29天,平年的2月有28天 ...

Sat Dec 01 01:55:00 CST 2018 0 1825
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM