subject

Create a calendar program that allows the user to enter a day, month, and year in three separate variables as shown below.

Please enter a date
Day:
Month:
Year:
Then, ask the user to select from a menu of choices using this formatting:

Menu:
1) Calculate the number of days in the given month.
2) Calculate the number of days left in the given year.
The program must include the following functions:

leap_year: Takes the year as a parameter and returns 1 if a year is a leap year (Links to an external site.) and 0 if it is not. This information will only be used by other functions.
number_of_days: This subprogram will accept two parameters in the following order: month and year. It will return how many days are in the given month (Links to an external site.).
days_left: This will accept three parameters in the following order: day, month, and year. It should calculate the number of days left in the year, and return the value of a number of days left. This should not include the date the user entered in the count.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
question
Computers and Technology, 24.06.2019 00:00
The gene form of a trait is called a(n) 
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
How can the temperature of a room be raised by 5degreesf?
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
The ieee 802.11: defines standards for wireless local area network (wlan) communication protocols. identifies various computers or devices connected to a network. verifies any resource attached to another computer on a network that is different from the computer to which the user is logged on. connects multiple local area networks (lans) and wide area networks (wans).
Answers: 2
You know the right answer?
Create a calendar program that allows the user to enter a day, month, and year in three separate var...
Questions
question
Biology, 24.02.2021 19:10
question
Mathematics, 24.02.2021 19:10
question
Mathematics, 24.02.2021 19:10
question
English, 24.02.2021 19:10
Questions on the website: 13722361