Breathing treatments, exercise and medications can help the lungs work better and lower the risk of infections. Antibiotics can treat bacterial infections. Medications can also lower the amount of salt lost in sweat.