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
Do I need apache for php?
What is the difference between echo print and print_r in php?
what is session_set_save_handler in PHP?
What is the purpose of pear in php?
What does it mean when it says the csrf token is invalid?
Explain how to submit form without a submit button.
What are the benefits of composer?
Are php session secure?
What are classes in php?
Why do we use query?
what is constructor
What is input sanitization in php?
How is traits used in php?
What are the differences between session and cookie?
How to get the total number of values in an array?