It did not rain and so the crops withered away

change the following sentences into “If conditionals” (1) It did not rain and so the crops withered away. (2) I did not know that you were in the hospital. I did not visit you.

(1) If it had rained, the crops would not have withered away.
(2) If I had known that you were (had been) in the hospital, I would have visited you.