Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

In this question, please write a function daysInMonth, that takes the year and month as two integer arguments and returns the number of days in

In this question, please write a function daysInMonth, that takes the year and month as two integer arguments and returns the number of days in that month. Use the function "isLeapYear" from the previous problem (you can assume that it works) to accommodate for leap years. Make sure your function is syntactically correct.

You can assume that the year will be greater than 0 and that the month will take the values [1-12].

the previous problem is written below

Everyday has 365 days in the Gregorian calendar. Because we know that the Earth takes a little longer than 365 days to orbit the Sun, we often have an extra day in Feb to correct this issue. The following statement is rule for when are leap years according to US naval observatory.

Every year can be divided by 4 is a leap year, except for years that are exactly divisible by 100, but these centurial years are leap years if they are exactly divisible by 400. For instance, years 1700, 1800 and 1900 are not leap years because of the reason stated above. However, 1600,2000,2400 are the leap years.

answer this -> Write a function isLeapYear that takes the years as an integer argument and returns 1 if it is a leap year and 0 if it is not a leap year. Make sure your function is syntactically correct.

please use C language

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students explore these related Databases questions