医者は感染を治すために薬を処方しました

Meaning
the doctor prescribed medicine to treat the infection

Vocab used in this sentence

医者
doctor, doc, medic, physician, quack
a, the, is, am, are, will
感染
infection, infected, infectious, contagion, outbreak
o, the, to, wo
治す
cure, fix, correct, heal, repair
ため
for, due to, because, in order to, because of
in, to, on, at, into, upon
medicine, drug, pills, drugs, potion, medicinal, remedy
o, the, to, wo
処方
prescribed, prescription, regimen, formulation
and, shi, four, death
ます
will, to be, i will, to make, to do, to have
the, was, ta, da, other