
Answer:
Hence the greatest number of books that could be on the shelf is 30.
Step-by-step 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.