-->
当前位置:首页 > 题库

PROGRAMMING:What is the date of the year

Luz5年前 (2021-05-10)题库330
Define a date class date, which contains data member year, month and day, and member function: constructor is used to initialize data member, output and judge leap year.
Write the main function: create a date object, calculate and output the day of the year. Input format: the test input contains several test cases, and each test case occupies one line. When 0 is read in, the input ends, and the corresponding result is not output.
Input example:
2006 3 5
2000 3 5
0 0 0
Output example: (description in brackets)
64 (March 5, 2006 is the 64th day of the year)
65 (March 5, 2000 is the 65th day of the year) < br > < br > < br > < br > 65


answer:If there is no answer, please comment