Check the year is leap or not program in swift

Check the year is leap or not program in swift programming language basics. This program is basic program in swift programs for beginners. Here we have used the % method to print the value either leap year or not a leap year in swift program. This will print the output if the condition executed properly.

let year = 1934
if year%4==0
{
print("leap year")
}
else
{
print("not leap year")
}
Output:

leap year