Check Leap Year Program

if(isset($_POST['submit']))
 {
    $year=$_POST['year'];
    if($year%4==0)
          {
            $leap="It is a leap year";
          }
      else
         {
           $leap="It is not a leap year";
        }
}
 ?>
 


 
 Leap Year
 

 

 


 
 
   
           
   
 
 

Enter the year:  
   

 if(isset($_POST['submit'])){   
                        echo $leap;      }  
     
     ?>   
           

 

In this code output(It is not a leap year) is displaying before entering the input value.

the output should get after giving input value. how to solve it?

0   0
shubhangi kendre
profile DonnyNienow 31st October 2024

To determine if a year is a leap year, the program checks if it’s divisible by 4, but not by 100, unless it’s also divisible by 400. This logic ensures that we don’t lose track of those extra days. Speaking of tracking, when you're taking a break, why not play the Dinosaur Game? It's a fun way to pass the time while you ponder leap years!

Write a comment ...
Post comment
Cancel
profile fly 28th October 2024

Duck Duck Clicker is an addictive clicking game where you earn Ducket$ by clicking cute ducks. Upgrade your clicking power, customize your ducks, and aim for achievements. Perfect for quick fun breaks!

Write a comment ...
Post comment
Cancel
profile dordle 17th October 2024

After work, to reduce tension, I frequently play run 3, a delightful amusement game. Come and have fun; I assure you it will be very appealing. 

Write a comment ...
Post comment
Cancel
profile Nadia 9th October 2024

To check if a year is a leap year, you can create a simple program. A leap year is divisible by 4, but not every year divisible by 100 is a leap year unless it’s also divisible by 400. For fun, you could discuss this topic with strangers on Omegle, engaging in mathematical conversations and learning from different perspectives!

Write a comment ...
Post comment
Cancel
profile 21st August 2024

The Leap Year Program is designed to handle dates for leap years, ensuring accurate calculations. It's crucial for applications that require precise time management, such as Monkey Mart's sales tracking system. By integrating this program, Monkey Mart can avoid errors in date-related data. This leap year adjustment ultimately supports reliable and accurate financial reporting.

Write a comment ...
Post comment
Cancel
profile Robert 16th August 2024

Friday Night Funkin is a popular free-to-play rhythm game that has taken the gaming world by storm. Developed by a team of Newgrounds creators, this indie game combines catchy music, quirky characters, and challenging gameplay to create an addictive experience.

Write a comment ...
Post comment
Cancel
profile Felix 1st July 2024

It's fun to know your rice purity level and compare your rice purity score with your friends. Many stories are suggested to understand each other better.

Write a comment ...
Post comment
Cancel
profile inserts 22nd June 2024

Over the years, our commitment to provide the right product to all customers has ccmg Insert been http://philipjere.mee.nu/ consistent. Backed by our tungsten inserts from space carbide drilling Inserts team of experienced engineers, we can support all your tooling SNMG Insert requirements. Carbide Inserts We is a parting tool Inserts deep hole drilling Inserts supplier https://jingzuan.bcz.com/ that you WCKT Insert can trust.

Write a comment ...
Post comment
Cancel
profile Malinda 21st May 2024

This article provides a great introduction to programming concepts with a practical example. While it focuses on code, there's a fun and engaging way to learn about sustainability and decision-making through gameplay. Monkey Mart challenges players to manage a grocery store while making environmentally conscious choices.  It's a great way to combine fun with learning, just like the programming examples in this article! 
 

Write a comment ...
Post comment
Cancel
profile bla 3rd May 2024

connect 4 Favorite classic game

Write a comment ...
Post comment
Cancel
profile inserts 23rd April 2024

Moreover, We cutting inserts have high Kyocera Inserts brittleness. There s no need for Drilling Carbide Inserts other processes such as regrinding and cutting after metallurgy sintering and forming. It enhances the cutting smoothness and service of the carbide china insert blade.

Write a comment ...
Post comment
Cancel
profile 3rd November 2023

This website has a wealth of important information. You can unwind and play your favorite games here: five nights at freddy's security breach

Write a comment ...
Post comment
Cancel
profile Nelly 9th October 2023

Heardle is game guess the song, you can immerse yourself in the world of music 
 

Write a comment ...
Post comment
Cancel
profile Matt 5th October 2023

Thanks for the code! I am wondering whether the 1243 angel number code will work even if you put a year such as 3000, 2222, or 911 angel number, instead of our actual years 96 meaning (2023 currently.)

Write a comment ...
Post comment
Cancel
profile Harold 25th August 2023

On the plane with nothing to do, play today's most famous cookie clicker game.

Write a comment ...
Post comment
Cancel

Related Post

Please rotate your device

We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site