Skip to content

mate-academy/kt-get-century-from-year

Repository files navigation

Get Century From Year

In this task, implement a getCentury() function that:

  • accepts the year variable;
  • returns a century this year is in.

Note that the first century begins from the year 1 and continues up to and including the year 100, the second from the year 101 to the year 200, and so on.

For example:

getCentury(1705) // 18
getCentury(1900) // 19
getCentury(1601) // 17
getCentury(2000) // 20

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages