Exercise is for muscle strength and endurance, mostly. Eating is for weight loss or gain.
So it depends on your goal.