why are computer science men so mean

Im a women studying computer science and its really true what they say. There is not a lot of women in the field, in my classes for the last two years there have always been 3-5 girls in a class of 30 to 40 students. I am a sophomore in college entering my spring semester and i've have multiple encounter with guys who just aren't very open to me. in one instance i asked two guys(who i am well acquainted with) to join their group for a physics projects, they said yes but would ignore my ideas on input. During my first semester during freshmen year , i had become close friends with another male peer who i met during orientation, the computer for the class we were taking together was not working so i attempted to restart it, starting with shutting off the monitor before i actually turned off the pc, when i turned off the monitor he tells me, "That is just the screen, not the actual computer". i've have multiple encounters like these where it just feels like they either have not genuine social cues or are just mean to me. because of the lack of women in my classes i feel rather alone, since my start univeristy i have made two friends which are women but because of different standing and majors we wont ever really have a class together.

What should i do about dealing with guys like this in the field, ive always been blunt and honest about situations like these but its become difficult for me to speak up for myself because of the intimidation that i feel in these classes. So far i have failed only two classes Calc 2 and my second semester of java, which was due to medical reasons but all of the men in my classes at the time had advance making me feel as if i don't have what it take to be studying computer science.