Write a Reader holding a total page count and the pages read so far, starting at 0. read adds pages but never past the total. percent returns the percentage read, rounded down to a whole number.
class Reader { Reader(int totalPages); void read(int pages); int percent(); }
Examples
There are also 4 hidden tests you can't see. Solve the problem, not the examples.