Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

You are stranded in the Apollo Capsule.

Name: Anonymous 2012-04-15 9:48

You have two "if"s, an "and", and an "or".

Can you use these to order three numbers from smallest to largest? If you have any leftover parts, you may redeem them for a chicken sandwich at Swilly's.

If you can't, you'll die at some point.

Name: Anonymous 2012-04-15 9:54

(I say "you" but I mean "me")

Name: Anonymous 2012-04-15 11:06

Or is a leftover part, I want my sandwich.
(define nigger
  (lambda (a b c)
    (if (and (< a b)
           (< b c))
    (list a b c)
    (if (< a b)
        (nigger c a b)
        (nigger b a c)))))

> (nigger 1 2 3)
(1 2 3)
(nigger 1 3 2)
(1 2 3)
(nigger 2 1 3)
(1 2 3)
(nigger 2 3 1)
(1 2 3)
(nigger 3 2 1)
(1 2 3)
(nigger 3 1 2)
(1 2 3)

Name: Anonymous 2012-04-15 11:15

Oh and I don't need the and. Another sandwich.

(define nigger
  (lambda (a b c)
    (if (< a b)
        (if (< b c)
            (list a b c)
            (nigger c a b))
        (nigger b a c))))

Name: Anonymous 2012-04-15 11:27

>>3
)))))
>>4
))))
GC is shit.

Name: Anonymous 2012-04-15 11:36

Two ifs, one && and one ||, as the rules said.


int apollo_helper(int* arr)
{
    if (arr[0] < arr[1] && arr[1] < arr[2]) {
      puts("phew, you had luck");
      return CREW_SHALL_LIVE;
    } else if (g_penis_len > 4.0 || g_anuses_enabled) {
      puts("WARNING: array not sorted, but it's not fatal");
      return CREW_LIVES_BUT_FORCED_TO_ANAL_SEX;
    } else {
      puts("sorry lads, you're out");
      return CREW_DIES_LOL;
    }
}

Name: Anonymous 2012-04-15 17:01

lambda a, b, c: return sorted((a, b, c))

Since we're apparently supposed to assume an unspecified number of > and < in addition to what was given, I decided to assume a standard library as well. I'll take my four sandwiches to go.

Name: bampu pantsu 2012-05-29 4:26

bampu pantsu

Don't change these.
Name: Email:
Entire Thread Thread List