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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!