The perimeter of a rectangle is 36 inches. If the width of the rectangle is 6 inches, what is the length?
A.30 inches
B.24 inches
C.18 inches
D.12 inches