help me with a c program that inputs a year number and number of years,then to determine which of those years were leap years

Recommended Answers

All 3 Replies

store the years in an array,
loop through the array and print out the element if it is properly divisible by 4

You do not need to store the years, just do for loop after determining the last year you need to test and do function for testing for leap year you call inside the loop.

Post how far you have been able to code it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.