Viagra, commonly known as sildenafil , is primarily prescribed to treat difficulty achieving an hard-on for men. It can also be prescribed sometimes for alleviating pulmonary high blood pressure in the lungs . Its function involves widening the vessels in the male reproductive area allowing for i