Viagra is primarily used to treat erectile dysfunction (ED), frequently referred to as impotence. In some cases , it might find application in managing pulmonary high blood pressure in the lungs , a disease affecting blood pressure in the lungs. This medication works by enhancing blood flow to t