Hello and welcome to healthcare magic!!!
Going through your symptoms it looks like you have developed what is known as pleurisy
which is a sharp pricking pain which increases whenever you cough
and whenever you inspire or expire, i would suggest you get a Chest x ray
done at the earliest and also get yourself evaluated by a physician or a pulmonologist so that you can be completely cured. If the cough is still persisting a culture sensitivity of the sputum would also be helpful in choosing the appropriate antibiotic.