Course of Raku / Essentials / Conditional checks / Exercises

Leap year

Problem

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

Example

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

Solution

See the solution

Course navigation

Code blocks / Local variables   |   Loops

Translations of this page: EnglishDeutschEspañolItalianoLatviešuNederlandsБългарскиРусскийУкраїнська