Answer:
Hence the greatest number of books that could be on the shelf is 30.
Explanation:
Step 1:-
Here the given number of books is m,
m < 45.
If they are arranged into piles of five books, each no books would remain.
m is divisible by 5.
The last digit of m would be 5 or 0.
The same number of books, when arranged with piles of 7 books each, two books remain.
m-2 is divisible by 7.
Step 2:-
The last digit of m is 5 or 0.
m-2 will have the last digit 3 or 8.
Multiples of 7 are 7,14,21,28,35, 42;
among which only number 28 has the last digit 8 or 3.
m - 2 = 28
m = 30
The greatest number of books that could be on the shelf is 30.