For UCB, are you in the EECS major, or in L&S? If you are in L&S, you need a 3.3 college GPA in the three prerequisite courses to declare the L&S CS major.
For UCLA, are you in the CS major? If not, it will be very difficult to get into the CS major.