First please take medications for you cough
Since you have been coughing for a week, there has been a lot of repetative abdominal wall contractions.
This is the cause of your pain.
I suggest you take cough reducing medicines and do not stress
yourself while coughing.
Hope this helps.