Skip to content

Commit

Permalink
kt-get-century-from-year task has been completed
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktoriia Ihnatiuk committed Aug 25, 2024
1 parent 6ee2066 commit caaaea3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/kotlin/mate/academy/GetCentury.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package mate.academy

fun getCentury(year: Int) : Int {
return 0
return if (year % 100 == 0) {
year / 100
} else {
year / 100 + 1
}
}

0 comments on commit caaaea3

Please sign in to comment.