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 php errors?
What php framework does wordpress use?
What is the output of the following php code?
How are sessions maintained?
What are the steps for the payment gateway processing?
Why is php used?
Is php used for frontend or backend?
What are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?
What is namespaces in PHP?
Suppose we receive a form submitted by a post to subscribe to a newsletter. This form has only one field, an input text field named email. How would we validate whether the field is empty? Print a message "the email cannot be empty" in this case?
Explain what does $_files means?
Tell me how comparison of objects is done in php5?
Write a program to display reverse of any number?
What is the difference between php4 and php5?
What is the function in PHP do not return a timestamp?