Input (grade 8): Note that 1800 is actually the last year of the 18th century; 1801 was the first year of the 19th century.
Output (grade 10): Note that 1800 is actually the last year of the 18th century; 1801 is the actual first year of the 19th century.