To find out the current year is leap year or not which
date() function we've to use.Give the syntax also
Answer Posted / krishna reddy ketha
NOTE:
IT IS ONLY FOR FIND OUT THE GIVEN YEAR IS
LEAP YEAR OR NOT.
CONDITION:
/*
leap year:
// is divisible by 4 and not by 100
// is divisible by 400
*/
if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
printf("%d is a LEAP YEAR" + year);
else
printf("%d is NOT a LEAP YEAR" + year);
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What does $_server means?
Explain php explode() function.
Tell me how to find current date and time?
Can php run on windows server?
What is a persistence cookie?
Write an example to remove html tags from a string in php?
How to convert a json string to an array in php?
Who is known as the father of php?
What is the difference between overloading and overriding in php?
How to replace a substring in a given string?
What are sql functions?
What is csrf token and why it is required?
What is alias in php?
What is html used for?
How can we determine whether a php variable is an instantiated object of a certain class?