answersLogoWhite

0


Best Answer

If the year divides evenly by 4 it's a leap year. If it's a century year it has to divide evenly by 400. 2000 was a leap year. 2100 will not be a leap year.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the program in c to check whether a year is leap year or not in simple way?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program to check whether a given year is leap year or not using ternary operator?

leap yr = ((y%100!=0 && yr %400==0)?1:(yr%4==0)?1:0; leap yr =1; printf ("leap yr"); else printf ("not leap yr");


How many days are there in 87 years including leap years?

It depends on when you start - whether in a leap year or not, whether your time span includes a xy00 year or not. So there is no simple answer.


Write a shell program to check and display 10 leap years?

dono


'write a program to check whether given year is a leap year or not?

#include using namespace std;int main(){short numberOfDays = 0;cout > numberOfDays;if (numberOfDays == 365){cout


When was The Impossible Leap in One Hundred Simple Steps created?

The Impossible Leap in One Hundred Simple Steps was created in 2003.


How do you write a program in java to check a year leap year or not and display the proper message?

You can use a number of nested "if" commands. The rules are the following: If the year is a multiple of 400, it IS a leap year. Else, if the year is a multiple of 100, it's NOT a leap year. Else, if the year is a multiple of 4, it IS a leap year. Else it's NOT a leap year. In Java, to check for divisibility, you use the "%" operator, which gives you the remainder of a division. For example: if (year % 400 = 0) ... To show results on screen, you use: System.out.println(...)


Does the Mayan calenday recognize leap year?

Simple answer - no.


How do you determine leap years using Linux?

If you want to determine whether a year is a leap year. Use the cal command for the month of February. So to check 2012, for example, do: cal 2 2012 and see if it prints 28 or 29 days.


Was 1788 on a leap year?

Yes. It is divisible by 4. Whether or not leap years were recognized that long ago, I am not sure.


Mao's program to increase production?

Great Leap Forward


What program was intending to overcome the backwardness of China's economy technology and industry?

the Great Leap Forwardthe Great Leap Forward


What is the definition of leapt?

Simple past tense of the verb to leap.