how do you stop from cramping when exercising?

I have cramps when I exercise.

Try warming up and cooling off for 15 min before and after exercising
Consuming Potassium does help like bananas. I hope it helps