In an arithmetic progression, the 5th term is 18 and the 9th term is 30. Which of the following correctly represents the required relations between the first term a and the common difference d?
(a) Both a+5d=18 and a+9d=30
(b) a+4d=18 only
(c) Both a+4d=18 and a+8d=30
(d) Both a+3d=18 and a+7d=30