Course of Raku / Essentials / Conditional checks / Exercises

Leap year


Write a program that tells if the given year is a leap year. Use prompt to enter a year.


An example of the output for the two cases of when the year is leap and when it is not.

$ raku leap-year.raku
Year: 2000
Leap year

$ raku leap-year.raku
Year: 2021
Common year


See the solution

Course navigation

Code blocks / Local variables   |   Loops