How do You Write a PROLOG Program to Find Leap Year?

predicates
run
check_year(integer)
clauses
run if
write("Enter the year"), n1,
readint(y),
check_year(y),
write("This is a leap year"), n1.
run if
write("This is not a leap year"), n1.
check_year(y) if
0=y mod 4, 0<>y mod 100;
0=y mod 400.

Output:
goals: run
Enter the year: 2020
“This is a leap year”