Question: For this exercise, you are going to take your function leap year program that you wrote last week and put the logic of calculating whether
For this exercise, you are going to take your function leap year program that you wrote last week and put the logic of calculating whether it is a leap year into a function. The function prototype should be int isteapYear (int year) It should return 0 if t is not a leap year and 1 if t is a leap year. Your leap year function must not print anything. You should call this function from your main function, which is where you print the result. $./leapYear2 Enter a year after 1582: 12 12 is before 1582. $./leapYear2 Enter a year after 1582: 2000 2008 is a leap year. $./leapYear2 Enter a year after 1582: 2004 2004 is a leap year
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
