Prerequisite – PL/SQL introduction
In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations.
Given a year, the task is to check that given year is a leap year or not.
Input: 1500 Output: 1500 is not leap year. Input: 1600 Output: 1600 is a leap year
A year is a leap year if following conditions are satisfied:
1) Year is multiple of 400
2) Year is multiple of 4 and not multiple of 100
1600 is a leap year.