The gassiest cattle are feedlot cattle. Cows didn't evolve (or weren't designed, depending on your beliefs) to digest anything except tough, fresh natural grasses and shrubs. It's as if I were to go out into a field and start munching on sawgrass: I'd probably get diarrhea and tear up my insides with all the undigestible gunk. Same goes for cows. Cows are built to break down cellulose into simpler starches within their extremely complex digestive tracts.
When cows are fed a meal of oats, corn, dry alfalfa and bales of dry hay for long periods of time they develop chronic inflammation, which causes them, like it cause us, to waste away and become infected. Then the mass meat companies bring in industrial veterinarians to administer exogenous antibiotics and steroids to keep the cattle "heatlhy" and "beefy." All of which leads to a very unhappy cow.
Have you ever been to an open pasture cattle ranch? It smells a heck of a lot less than the feed operations that run along I-5 in California (and these are the small ones!). You can even see calves running around and frolicking in the fields, plenty of natural shade from trees, and there's usually abundant wildlife in the area as well. These are happy cows up until the very end, and that's a reality all of us have to face at some point.
1) eat real food - more vegetables, moderate meat, moderate fruits, less grains, less sugar, less vegetable oils.
2) exercise - moderate intensity cardio, sprinting, heavy lifting, dedicated stretching and mobility.
3) live - relax, de-stress, meditate.
Disclaimer: I'm not professionally qualified to make any formal recommendations. I've just done my homework and I'm my own guinea pig. All of my data, unless otherwise cited, comes from a sample size of n=1 (me).