Question: In C++ Problem 3 Write a function called checkLeapYear that takes a single integer argument representing a year and returns 1 if it is a
Problem 3 Write a function called checkLeapYear that takes a single integer argument representing a year and returns 1 if it is a leap year and 0 otherwise. This function should use a single if statement and Boolean operators. .Your function MUST be named checkLeapYear. . Your function should take one parameter: the year value, as a positive integer .Your function should return 0 or 1, according to the leap year definition (see below). What is a leap year? In general, years divisible by 4 are leap years. For dates after 1582, however, there is a Gregorian correction. Years divisible by 100 are not leap years but years divisible by 400 are. So, for instance, 1900 was not a leap year but 2000 was
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
