Purchase Solution

C program to determine a leap year

Not what you're looking for?

Ask Custom Question

Write a C program to determine whether the year entered from the keyboard is a leap year. Display a message indicating whether the year is or is not a leap year.

An year is a leap year if it is evenly divisible by 4 and not divisible by 100, or if it is evenly divisible by 400.

For example, legal leap years are 1952, 1964, 1988, and 2004. Years 1953, 1966, 1990, and 2007 are not leap years.

Purchase this Solution

Solution Summary

Attached program also checks for a valid year input, that is, year value can not be negative.

Solution Preview

Please find attached 412910.c that implements the given logic of finding leap year and has been tested ...

Purchase this Solution


Free BrainMass Quizzes
C# variables and classes

This quiz contains questions about C# classes and variables.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Basic Networking Questions

This quiz consists of some basic networking questions.