Why don't girls code more?
It looks so nice and well structured
Girls should code more
nice bait
Girls can make great programmers. Clearly this one doesn't. What's your point OP?
I'm not a programmer
Is this literally a program to multiply things without using a multiplication sign
You know I get kind of sick of this.
There are wonderful female programmers out there. I have personally met and have worked with several. Then I have met girls who suck at code but get pushed along because there's this "women in tech" movement -- reinforcing sexist stereotypes that women can't code or whatever.
Why don't we just try to be objective and evaluate code on its own merits?
Yes, and it's done poorly. It illustrates an understanding of java, but does so at the cost of higher principles like DRY.
Girl detected.
Society raises girls 'differently', then, when they grow up, some of them think they have to "be different" (there's no 'boys who code').
Raise your girls (if you guys are having any kids) "like boys": let them face the world and fall down and get up and break RC cars after one week to see what's inside and...
Now recommend me some
What's the "right" answer to this question?
Do you just bitshift 'a' 'b' times
there are many ways to do it but definitely not by bitshifting 'a' 'b' times
I realized as soon as i posted it that it would end up being a^b. forgive me :/
you mean a*2^b
Just add a to itself b times. So a for loop with incrementation of a by it's original value b times should work.
for(int i = 0; i < b; i++) a += a;
return a;
lmao
>Girls can make great programmers.
Correct, giving birth is the only thing women are good for, and their sons could potentially be great programmers.
wow im dumb i thought this was le super clever haxor knowing that the computer uses powers of two and you can bitshift those to simulate multiplication
i forgot what multiplication was
why the fuck isn't this a loop
that's the joke dude
This.
There are great programmers that happen to be women, but the set of genitals you get is seldom relevant.
I wish people would quit with the divisive bullshit and let people do what they enjoy doing, whatever that is.
post code faggits
int mult(int a, int b)
{
if(a < 0 && b < 0)
return mult(abs(a), abs(b));
if(a < 0)
return mult(b, a);
if(a == 0)
return 0;
else
return b + mult(a-1, b);
}
int mult(int a, int b)
{
if(a < 0 && b < 0)
return mult(abs(a), abs(b));
if(a < 0)
return mult(b, a);
int temp = 0;
while(a-- != 0)
{
temp += b;
}
return temp;
}