brewersfan1976

century_from_year.rb

Sep 30th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.13 KB | None | 0 0
  1. def centuryFromYear(year)
  2.     if year % 100 == 0 then
  3.        return year / 100
  4.     else
  5.        return year / 100 + 1
  6.     end
  7. end
Advertisement
Add Comment
Please, Sign In to add comment