While CompSci is far more than just programming, I will say that I was absolutely crap at math until I got into programming. After all, programming is applied mathematics to a decent degree.
People liked to tell me growing up that you needed to be good at math, especially algebra, in order to understand programming. It certainly helps. But I feel the inverse is true as it was the key to making sense of the abstract academic mathematics I was taught in class. It made me see X, Y etc. as something useful rather than just random junk.
I tell my programming students, don’t worry if you struggle in math. If you can follow along and understand this, your math will improve greatly. Sure enough for the students who are doing well in my class, their math has also improved greatly.