Program to check whether the entered year is leap year or not( a year is leap if it is divisible by 4 and divisible by 100 or 400)

Problem Analysis:

The problem is to check whether the entered year is leap year or not ( a year is leap if it is divisible by 4 and divisible by 100 or 400.

 

Algorithms :

1.start

2.Define :year:

3.Enter: year by user.

4.If ( year%4==0) && (year%100!=0)//(year%400=0):

print the output as leap year else if it is not leap year.

5.output : leap year, not leap year.

6.End.

 

Codes:

 

outputs:

Compiling  , Debugging  and  Testing

Enter any year : 2020

leap year.

 

About Programmingfaster

We the teams of programming faster managed to provide an effective information about the codes of different programming languages.Hope you will learn and understand the codes fast and easy. It's absolutely free, expanding and precise. Our main target is to help those new starters and aid them as far as possible to pave their future in the area of programming. Hoping support and recommendations!
This entry was posted in C, precise examples and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *