Question: The is Leap year function returns true if the specified year is a leap year. Otherwise it returns false. Write an all Leap Years function.

The is Leap year function returns true if the specified year is a leap year. Otherwise it returns false. Write an all Leap Years function. The function should take two parameters: An integer array, and the number of elements. It should return true if every element of the array is a leap year. Otherwise it returns false. For each element, call the is Leap Year function to determine whether or not it is a leap year. bool is Leap Year(int year) { return (year % 400 ==0) || (year % 100 1= 0 && year % 4 == 0); } bool all Leap Years(int a[]# int n] {//Fill in this function } int main () { int a[] = {4, 8, 12>; cout ; cout
Step by Step Solution
There are 3 Steps involved in it
To complete the allLeapYears function we need to iterate over each element of the array and check if ... View full answer
Get step-by-step solutions from verified subject matter experts
