Century. Given a year as a positive integer, print its century. Mind that the 20th century began on 1901 and ended on 2000.
Input |
Output |
1899 |
19 |
1900 |
19 |
1901 |
20 |
2000 |
20 |
2001 |
21 |
Python, Java
Century. Given a year as a positive integer, print its century. Mind that the 20th century began on 1901 and ended on 2000.
Input |
Output |
1899 |
19 |
1900 |
19 |
1901 |
20 |
2000 |
20 |
2001 |
21 |