Thanks for your query,
This type of pain may be due to many causes like strain to the neck,trauma/injury
to the neck or Fibromyalgia
, ankylosing spondylitis
etc and other bone and joint disorders. So severe cough
may be a cause by creating strain there. You may need some analgesics, analgesic gels and some neck exercises. There may also be need of some investigations. You better consult a good physiotherapist if it is persistent.