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 is composer phar?
How to create a directory?
Is php closing tag necessary?
What is member function?
What is string and its function?
Where are cookies stored php?
Why php is widely used?
How does php work with apache?
How to take a substring from a given string in php?
Tell me how to strip whitespace (or other characters) from the beginning and end of a string?
Explain what are the different errors in php?
Which function is used in php to count the total number of rows returned by any query?
Explain me is multiple inheritance supported in php?
What does type casting mean in php? Explain with an example?
What is php stack?