Each shelf of a bookcase contained 12 books. If the librarian took out 21 books and rearranged the remaining books so that all shelves but one contained 7 books and the last shelf contained 11 books, how many shelves does the bookcase have? Choose the correct choice from the following answers.
A) 7	B) 6	C) 4	D) 5	E) 3
Let x be the number of shelves.   No of books in the beginning =12*x   After taking out 21 books No of remaining books = 12x -21   when the remaining books are rearranged, each shelf except the last shelf has 8 books and the last shelf has 11 books. So No of remaining books is also equal to 7*(x-1)+11   12x-21=7(x-1)+11   5x=25   x=5. Answer 5
<result>D</result>
Each shelf of a bookcase contained 12 books. If the librarian took out 21 books and rearranged the remaining books so that all shelves but one contained 7 books and the last shelf contained 11 books, how many shelves does the bookcase have?