Hello dear
Warm  welcome to Healthcaremagic.com
I have evaluated your query thoroughly .
*  The farting is basically in relation with 
indigestion or improper bowel
    movements .
*  Make sure to get proper smooth regular bowel evacuations each morning
    to avoid farting whole day in public or private  , guidelines for that :
-  Regular walking in fresh air , exercises , YOGA
-  Balanced nutritious diet with avoidance of oily , spicy , non veg stuffs ,
    dairy fat .
-  Avoid 
smoking , alcohol .
-  Relieve yourself from underlying 
stress , 
anxiety .
-  Have regular sound sleep of 8 hours .
-  If  required can get help in terms of pro biotics , pro kinetics , bulk 
    forming  laxatives  to  get  faster  recovery .
Hope this clears your doubt  .
Wishing you fine recovery .
Welcome for any further  assistance .
Regards  take care .