Question: Write a C program for determining if a year is a leap year. In the Gregorian calendar system you can check if it is a
Write a C program for determining if a year is a leap year. In the Gregorian calendar system you can check if it is a leap year if it is divisible by 4 but not by 100 unless it is also divisible by 400. For example, 1896, 1904, and 2000 were leap years but 1900 was not. Write a program that takes in a year as input (as a command line argument) and returns the string "{year} was a leap year'' if true and "{year} was not a leap year'' if false.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
