Skip to content
This repository was archived by the owner on Jun 26, 2022. It is now read-only.

Commit cc2051d

Browse files
Merge pull request #702 from prachi411/master
Create prachi411_leapyear.php
2 parents ca6480c + 67bb2e3 commit cc2051d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

php/prachi411_leapyear.php

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<html>
2+
<head>
3+
<title>Leap year or not</title></head>
4+
<body>
5+
<h1>This page will show the leap year</h1>
6+
</body>
7+
</html>
8+
9+
<?php
10+
function year_check($my_year)
11+
{
12+
echo $my_year;
13+
echo "";
14+
if ($my_year % 400 == 0)
15+
print("It is a leap year");
16+
else if ($my_year % 4 == 0)
17+
print("It is a leap year");
18+
else if ($my_year % 100 == 0)
19+
print("It is not a leap year");
20+
else
21+
print("It is not a leap year");
22+
}
23+
$my_year = 2024;
24+
year_check($my_year);
25+
?>

0 commit comments

Comments
 (0)