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 are the ways to define a constant in php?
What are the __construct() and __destruct() methods in a php class?
How to remove duplicate values from a PHP Array?
Which php global variable is used for uploading a file?
What is a string in php?
What is active record in php?
How to find length of an array in php ?
Is empty in excel?
How can you create a session in php?
How can you submit a form without a submit button?
Explain the difference between $var and $$var?
Does https prevent csrf?
What is php in full?
what is the current salary package in India for a PHP programmer who has 1.5 years experience
How to open a file for writing?