Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Will this work?
#11
(10-05-2011, 19:00)Lemon Wrote: 2 lemons + 3 oranges = OMA

*Mind blown*



















[Image: Sohardcore.jpg?1315989177]
Reply

#12
1+1+1+1+1+1+1+1+1+1-1+1+1+1+1+1+1x0 = 14
I like turtles
[Image: thumb-275x274-design-609.png]

Reply

#13
so, u want a function for that?
i think its pretty hard to make... hmmm
[Image: ctoc.jpg]
Reply

#14
Well made a start in gsc code (not yet done though):
Code:
/********NOT YET DONE*********
* Purpose: Does the Expression with various groupings.
* Parameter Expression requires a string.
* Seperate each integer and operator with a space.
* Example input: "11 + 2 - 3"
* Returns an array of the (unique) results.
*/
noParens( Expression )
{
    if( !isDefined(Expression) || Expression == "" )
        return undefined;
    Tokens = strTok( Expression, " " );
    if( Tokens.size == 1 )
        return int(Expression);
    for( i=0;i<Tokens.size;i++)
        if( i%2==0 )
            Tokens[i] = int( Tokens[ i ] );
    resultArray = [];
    
    //TODO: Do the various groupings here and put the results in resultArray[].
    
    for( i=0;i<resultArray.size;i++ )
        if( isDefined( resultArray[i] ))
            for( x=i+1;x<resultArray.size;x++ )
                if( isDefined( resultArray[x] ) && x != i && resultArray[i] == resultArray[x])
                    resultArray[x] = undefined;
    resultArrayNoSame = [];
    for( i=0;i<resultArray.size;i++ )
        if( isDefined( resultArray[i] ))
            resultArrayNoSame[resultArrayNoSame.size] = resultArray[i];
    return resultArrayNoSame;
}
Edit: Small improvement.
Reply

#15
Uhhh this IT english.. hurts brain
[Image: lQDUjba.jpg]
Reply

#16
What he means is:
when you do 1 + 2 + 3 * 4 - 5 * 2 the answer is 5 but when you do
1 + 2 + 3 * (4 - 5) * 2 the answer is -3
he wants to know all possible answers by putting the brackets () somewhere else
[Image: MaEIQ.png]
Reply

#17
(10-05-2011, 21:38)Pozzuh Wrote: What he means is:
when you do 1 + 2 + 3 * 4 - 5 * 2 the answer is 5 but when you do
1 + 2 + 3 * (4 - 5) * 2 the answer is -3
he wants to know all possible answers by putting the brackets () somewhere else

And why do he want to know that?
Reply

#18
Justin Is the only one who didn't get owned by the mindfuck
Reply

#19
It's asking to create a function which will calculate every single combination possible by moving/shifting brackets. Probably overdid it in the explanation but lol. I believe this was one of the question used in a programming interview. Seems copy and pasted anyway.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#20
(10-05-2011, 22:38)johamort Wrote: Justin Is the only one who didn't get owned by the mindfuck

I didn't get mindfucked ...
[Image: MaEIQ.png]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Permissions DOESNT work Hallla 2 2,848 08-18-2013, 11:28
Last Post: hillbilly
  why permissions dont work. ? ExoGamer* 4 3,044 07-21-2013, 13:46
Last Post: X-Track
  Bunker Plugin Won't work OBJAY 4 4,159 06-03-2013, 15:48
Last Post: X-Track
  Help prefix doesnt work with shop koro35 2 2,668 05-18-2013, 10:51
Last Post: koro35
  Help Perks do not work (( x1412 6 4,039 04-06-2013, 18:09
Last Post: x1412
  liberation dont work? puistis 7 7,360 02-18-2013, 09:17
Last Post: JariZ
  Weapon dont work?? Erik The Born 3 2,646 02-05-2013, 19:53
Last Post: Yamato
  private match maps won't work with mods! leereef 1 2,353 01-13-2013, 12:01
Last Post: surtek
  Some images do not work with SetShader xplosiff 8 4,470 01-05-2013, 07:19
Last Post: mw2killer
  Help !giveammo Plugin doesnt work [solved] Hallla 3 3,274 12-29-2012, 20:53
Last Post: Hallla

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.