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

Programming - hard mode

Name: ||GASM 2011-04-09 20:12

Idea for a programming challenge. 2 rules

No fixing code you have already written, you must add more code to make up for the bugs in the existing code.

Write the first thing that comes to mind. No rethinking an implementation in your head.

Let's see what we can create.

Name: Anonymous 2011-04-09 20:48


#include <stdio.h>
#include <lisp.h>
#define loop for
#define dicks 12
#define BEGIN { lolwut();
#define END }
int main()
BEGIN
 puts("/prog/");
 int nope = 0;
 goto saved;
 loop(;;nope)
    BEGIN
        print(eval(read()));
    END
 saved:
 printf("Disaster averted...\n");
 return factorial(dicks);
END

int factorial(n)
BEGIN
 if (n==0)
    BEGIN
       return 1;
    END
 else if (n > 0)
    BEGIN
        return n * factorial(n - 1);
    END
END
int lolwut()BEGIN
 int x = 0;
 int* xstar = &x;
 for(;;)BEGIN
   xstar = xstar*dicks;
 END
 return dicks;
END

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