text:
C: Output "tomorrow's date"
I'm a code golf novice, but I'm eager to give it a go.
My challenge is: Write the shortest program in C which takes in a date D as input and outputs the date D + 1 day
Rules:

program must compile only with gcc progname.c -o progname So no compiler/makefile tricks (if there are any) - compiler warnings don't matter
The input and output format must be day/month/year zero padding of single digit values does not matter: 1/3/1998 is equal to 01/03/1998
It doesn't matter how you give the the program it's input date, it can be a program argument, scanf whatever. Output must be to stdout however
February has 29 days when the year is divisible by 4
No date validation necessary, i.e. assume the input is always a valid date.
any integer year should be supported, i.e. INT_MIN -> INT_MAX

Shortest code length wins, and there are extra points for extra bastardised C.
My solution uses 126 123* 121 characters
Good luck
*s="%i/%i/%i",m,d;main(y){scanf(s,&d,&m,&y);printf(s,d,m,(d=d%((m>7^m&1)+27+(m-2?3:y%4?1:2))+1)-1?y:(m=m%12+1)-1?y:y+1);}

*because of an idea Gareth's code gave me

February doesn't have 29 days when the year is divisible by 100 unless it is also divisible by 400. Or is your last rule there to simplify matters slightly?

@Gareth I think so.

@Gareth, yes it's a simplification.

Code golf is usually open for all languages, except if the problem can only be solved in one language. Please lift the restriction on using C only.

@FUZxxl "Usually"... Not this time :)

@Griffin Would you mind reading this?

@FUZxxl, I read it but I don't agree, if it's any language, then really it's to who knows the least verbose language for the problem. This way, everyone who wants to play, is on a level playing field, it's also a test of how much you can push the given language and the restraint should force more creativity. Anyway, as the code-golf tag states: "Code-golf is a competition to solve a particular problem in the fewest bytes of source code." - Doing it in C is part of the problem. No one is forcing you to play though :)

To whomever voted me down, care to explain it? You either take part in the challenge or you don't. What possible objective reason was there for the down-vote?

@Griffin The downvoter probably don't likes the idea of having a C-only competition.

@FUZxxl, so what, I should be down-voted? Or should they just not take part instead? What a joke, thought this site was for a bit of fun.

@Griffin I did not vote down. I accept the conditions you give, but suggest changes. I just want to explain what reasoning (s)he has.

Further clarification needed: a) Should the input get checked for validity, b) what is the year range to handle (e.g should BC years get handled)?

@Harry, I've added that info, thanks for catching that.

I downvoted later, but not for the language restriction, but for the idea of leap-years. @FUZxxl: You can't explain the reasons somebody else had, if you don't know them.

On a 2nd thought, the problem doesn't make sense now! For example, how will the program respond on an input like this: -300/20000/-32768

@Harry, That's not a valid date format, the range I have was for years. days can only be from 1 to 30 and months from 1-12, clearly there is no restriction on number of years - Just saw my edit mistake, sorry harry, I've fixed it now.

@Griffin: Still, the best way I know to handle such tasks is to convert first a Gregorian date to a Julian Day Number, but there are several issues to consider for really early years, which I really doubt they fit in just 126 chars (before Gregorian year 400 for example) .

@Herry, man its just a simple, if you go into all of the intricacies of dates, you'll never finish defining the challenge.
If you reach the last day of the month, you go to the next month, same with last day of the year, you go to the next year. Take into account my simplified leap year and thats it.

@Griffin: Nah, I think I'll skip this one altogether, it's too (over)simplified and tailored for my taste after all. But no down-votes from me ;) Good luck to all who'll participate though!

@Harry, sorry to hear it doesn't interest you enough, but it's pretty hard to get it down to so little characters.

You can still have the best C-language entry in a challenge that is open to other languages.  I don't see the purpose of restricting it.

i think more efficient count bite not characters.

Okay, it's been a while since I wrote any C but I'll give it a go:
m,y,*q="%d/%d/%d";
main(d){
scanf(q,&d,&m,&y);
++d>30+(m+(m>7))%2-(m^2?0:2-!(y%4))?(m+=d=1)>12?y+=m=1:0:0;
printf(q,d,m,y);}

120 characters.
With a bit of formatting(not that it makes it any more readable any more...):
m,y,*q="%d/%d/%d";
main(d)
{
    scanf(q,&d,&m,&y);
    ++d>30+(m+(m>7))%2-(m^2?0:2-!(y%4))?(m+=d=1)>12?y+=m=1:0:0;
    printf(q,d,m,y);
}

The compiler throws out warnings like nobody's business, but it works.
I'm not sure I can get it any smaller than this now without stealing a couple of tricks from Griffin. With those tricks I can get to 116 characters:
m,y,*q="%d/%d/%d";
main(d){
scanf(q,&d,&m,&y);
printf(q,d,m,++d>30+(m>7^m&1)-(m^2?0:2-!(y%4))?(m+=d=1)>12?y+=m=1:y:y);}

Looks good mate, I reckon you can replace those ifs for ternary operators, also there's some repetition there that you can take out.

I'm not entirely sure how I'd use the ternary operator in this case. I've got no if else blocks.

You can just put a 0 in the else part:
if(x)b; becomes
x?b:0; you save one character, might take some refactoring though

@Griffin 125 characters. Do I get a prize? ;-)

That's excellent! You get a upvote from me. Though you've given me an idea that got my code down to 123 characters. I'll post it up since I've stolen your idea of making the vars global so as to not define a type for them.

I'm down to 123 now, and I think I've hit my limit for the night. Time for bed and nightmares about question marks, semicolons and braces. :-)

Steal as many tricks as possible. 116 is amazing.

Seeing as my I keep getting voted down for this question, I'm accepting your answer. I don't see 116 being beaten anyway.

Never say never - see my newly added answer.

C, 112 chars
Many months late, but I just saw it and decided to improve it.
The leading * isn't needed for 32bit platforms (and some 64bit platforms), so it can perhaps be removed.
*s="%d/%d/%d";
main(y,m,d){
    scanf(s,&d,&m,&y);
    d++>29+(m-2?m+m/8&1:!(y%4)-2)?d=m++<12||(y+=m=1):0;
    printf(s,d,m,y);
}

Lots of similarity to Gareth's solution, but honestly - I didn't look.
The only thing I did borrow was saving the format string in a variable (which is kind of obvious, but I missed it).
I do fix a problem with Gareth's solution - it relies on the evaluation order of printf parameters.

C - 293
#define w(x) while(*(i++)!='/');x=atoi(i);
main(){char x[99];scanf("%s",x);f(x);}
f(char* i){
int a=atoi(i),b,c,m[]={0,1,0,1,0,1,0,1,1,0,1,0,1};
w(b);w(c);
if(b==2)if((a==28&&c%4)||a==29){a=1;b=3;}else a++;else if(a-m[b]-30==0)if(b==12){a=b=1;c++;}else{a=1;b++;}else a++;
printf("%d/%d/%d",a,b,c);}

I've never really tried to golf C (and I am by no means an expert in C), but I feel this is pretty good.  Basically it goes like this: get input from scanf, convert days, shift pointer, convert months, shift pointer, convert years (latter two have a #define to help), do logic with calendar logic. year%4 was a cool trick, and I have a month hash table indicating if the month is 30 or 31 days (kinda big to declare, but I think it was worth it). Finally, print.  I'm sure there is a neat way to refactor using ternary (?:), but again, I'm no expert.
EDIT: fixed some typos.

Brilliant, someone is having a go. Good start but your program does not work correctly. If you input any date with month != 1, your code outputs day+1/1/year e.g. input: 1/12/1999 -> output: 2/1/1999, input: 24/2/1999 -> output: 25/1/1999. I suspect you maybe have a couple of typos - also remove the #include<stdio.h> you can printf and scanf without it, you'll just get compiler warnings :)

Oh whoops, the error in my program is because I had the mindset DD/MM/YYYY and then switched to MM/DD/YYYY halfway through and mixed it all up.  I'm interested in seeing your solution.

Hmmm, still not working: 23/06/20101 -> 1/7/20101

Ok try some test cases now.

Looks good to me :) try and chop some characters off now. Try and get a few of those ternary operators in, also consider if taking input via scanf using the same format you printf in is better or worse than parsing the input with a macro.

you can see my code now if you want ideas.

Ah, very good stuff. C is much more golfable than I anticipated.

C (in a way), 97 71
I will lose fifty rep for this but it was necessary.
The actual rule violation is that it doesn't quite do INT_MIN..INT_MAX; the range instead seems to be 0..1410065407 (on 64-bit Ubuntu 11... I'm saying nothing about portability :P).
main(){system("read a;date -d@$((`date -d$a +%s`+86400)) +%m/%d/%Y");}

(old version:)
d,e[9];main(){sprintf(e,"date -d@$((`date -d%s +%%s`+86400)) +%%m/%%d/%%Y",gets(&d))&system(e);}

I think this solution will not meet the spec if the given date is 28/02/1900. The correct (real world) answer would be 01/03/1900 but the spec calls for the answer to be 29/02/1900. (And I don't see why you should lose any rep for this answer)

106 100 characters
Another entry that breaks the year rule by supporting only the years 1 to 9999, and also implements correct leap year handling instead of following requirements.  The code simply uses POSIX libraries while abusing the type system:
t[9],b[9],*f="%d/%m/%Y";main(){gets(b);strptime(b,f,t);t[3]++;mktime(t);strftime(b,99,f,t);puts(b);}

You could save 7 characters by using gets instead of read and moving the gets call into strptime.

@marinus: Thanks, I had completely forgotten gets.  I didn't move the call inside strptime, since treating the implicit int return value as a pointer is likely to crash on 64-bit systems.


text:
Generating BF-code with single purpose
I'd like to see you create code (in any programming language) that output working BF (Brain***k) code. Your program have a single character input on stdin. The input should be one digit ("0", "1", "2", "3", "4", "5", "6", "7", "8" or "9").
Your code should output BF-code that when interpreted with a normal BF-interpreter outputs a 5*5 ascii version of the digit. The generated BF-code should not accept any input. The resulting output from the generated BF-code should be exactly this:
Input: '0'
Output BF-code that when interpreted generates the following output:
.---.
|  /|
| / |
|/  |
'---'

Input: '1'
Output BF-code that when interpreted generates the following output:
 .
/|
 |
 |
 '

Input: '2'
Output BF-code that when interpreted generates the following output:
.---.
    |
.---'
|
'---'

Input: '3'
Output BF-code that when interpreted generates the following output:
.---.
    |
 ---|
    |
'---'

Input: '4'
Output BF-code that when interpreted generates the following output:
.   .
|   |
'---|
    |
    '

Input: '5'
Output BF-code that when interpreted generates the following output:
.---
|
'---.
    |
'---'

Input: '6'
Output BF-code that when interpreted generates the following output:
.---
|
|---.
|   |
'---'

Input: '7'
Output BF-code that when interpreted generates the following output:
----.
   /
  /
 /
'

Input: '8'
Output BF-code that when interpreted generates the following output:
.---.
|   |
|---|
|   |
'---'

Input: '9'
Output BF-code that when interpreted generates the following output:
.---.
|   |
'---|
    |
'---'

The output from your code must be 10 different BF sourcecodes, one for each digit you input. Your program should not output all 10 BF in one run, it must ask for a digit and output BF code for that and only that ascii representation.
The BF-code requirements:

cell size: 8bit unsigned.
Overflow is undefined.
Array size: Max 30000 bytes (not circled)
It can contain other characters than [],.+-<>, but they should all be ignored. It is only - the standard BF code without any extensions that counts.
The EOF return 0
Linefeed is chr(10)

The winning answer will be the one that scores that lowest code using this formula:
your code in number of bytes * 5 + sum of the 10 generated BF codes

So keep in mind that you need to generate GOLF'd BF-code to score better.
Edit/Add (2011-08-25): You may omit or supply trailing spaces, as long as the digits displays the ASCII representation on a 80 column output, so the limit is 80 chars rows. Honor to the answers to generates exactly 5*5 output for all digits.

@user unknown : Thanks for spotting that unneccesary irregularity, I have updated the shape and tried to make it as uniform to the other digits as possible

Am I correct that the trailing spaces in the 5 are unintentional and not necessary? My solution does not include them.

@PleaseStand that is correct, you can omit or supply trailing spaces, as long as the digits displays the ASCII representation on a 80 column output, so the limit is 80 chars rows. I Will edit the question later today and include this info

And does the "EOF return 0" part mean I have to end my output with a null byte or does it mean , can substitute for [-]?

well, the EOF part is about how the bf-interpreter reads the bf sourcecode, so I guess it is not really applicable. Your output from your code or the output from the bf-code does not need to end with 0.

JavaScript (JS 455 * 5 = 2275, BF = 3505, score = 5780)
The generated code builds a character table as it produces its ASCII art output to save thousands of plus/minus signs overall. Output is placed into the text box in a prompt window so that it can be copied and pasted into a BF interpreter. The consecutive spaces in this program must remain verbatim for it to work correctly; hopefully, posting the code here will work correctly. (Note: The JS code requires ES5 or JavaScript 1.6 support to work properly.)
M=prompt;S="3cb80kh77j31f4031m10g251p64d1064a20ionle3292032510".substr(5*M(A=[]),5).replace(/./g,function(a){return"'---'0    |0|   |0.---.0|0'---|0.---0 |0|/  |0|---|0|---.0| / |0|  /|0'---.0'0.---'0.   .0/|0----.0 '0 .0 /0 ---|0  /0   /0    '".split(i=j=0)[parseInt(a,26)]+"\n"});for(O="";i<S.length;O+=".")D=A.indexOf(C=S.charCodeAt(i)),i++&&(d=-j+(j=D<0?A.length:D),O+=Array(d>0?1+d:1-d).join(d>0?">":"<")),D<0&&(O+=Array((A[j]=C)+1).join("+"));M(0,O)

Nice one!, I tested it in Google chrome Javascript-console and it seems to work flawless

BrainFuck (Score : 13073, BF : 2299 2286, BF (generated) : 1643)
,>++++++++[<------>->>>+++++++++++>+++++++++++>+++++>++++++++>++++++++>++++++>++++++<<<<<<<<<]
>>>+++>+++++>+++>---->-->--->--<<<<........<<.>>>>>.<.<<.>>.<<....>>.<<......>>.<<......>>.<<.
..............>>.<<......>>.<<.....>.......<<.>>>.<<..>>..>..<.>...<.<<....>>.>.<.>.<<<<<<<<+<
[>-]>[>>>>>>....>>>.<<.>>...<<<.>>>.<<<..>>>.<<....>>.<<<...>>>..<<....>>.<<<.>>>.<<<....>>>.<
<....>>.<<<...>>>.<<....>>.<<<....>>>.<<...>>.<<<....>>>.<<....>>.<<.>>.<<<....>>>..<<...>>.<<
<....>>>.<<......>>.<<<...>>>...<<...>>.<<<<<<<<<->>+<]>-[+<<<->[-]+>[-]<<[>-]>[>>>>>>.....>>>
.<<.>>.<<<..>>>.<<.....>>.<<<.>>>.<<<....>>>.<<.>>.<<...>>.<<<....>>>.<<.>>.<<...>>.<<<....>>>
.<<.>>.<<.....>>.<<<<<<<<<->>+<]>-[+<<<->[-]+>[-]<<[>-]>[>>>>>>....>>>.<<.>>...<<<.>>>.<<<..>>
>.<<.>>....<<...>>.<<<....>>>.<<..>>.<<.>>...<<...>>.<<<......>>>.<<....>>.<<<....>>>.<<......
>>.<<<...>>>...<<...>>.<<<<<<<<<->>+<]>-[+<<<->[-]+>[-]<<[>-]>[>>>>>>....>>>.<<.>>...<<<.>>>.<
<<..>>>.<<.>>....<<...>>.<<<....>>>.<<.>>.<<..>>...<<.>>.<<<....>>>.<<.>>....<<...>>.<<<....>>
>.<<......>>.<<<...>>>...<<...>>.<<<<<<<<<->>+<]>-[+<<<->[-]+>[-]<<[>-]>[>>>>>>....>>>.<<<.>>>
...<<.>>.<<<..>>>.<<....>>.<<<...>>>...<<...>>.<<<....>>>.<<......>>.<<<...>>>...<<.>>.<<<....
>>>.<<.>>....<<...>>.<<<....>>>.<<.>>....<<.....>>.<<<<<<<<<->>+<]>-[+<<<->[-]+>[-]<<[>-]>[>>>
>>>....>>>.<<.>>...<<<...>>>.<<....>>.<<<....>>>.<<......>>.<<<...>>>...<<<.>>>.<<<..>>>.<<.>>
....<<...>>.<<<....>>>.<<......>>.<<<...>>>...<<...>>.<<<<<<<<<->>+<]>-[+<<<->[-]+>[-]<<[>-]>[
>>>>>>....>>>.<<.>>...<<<...>>>.<<....>>.<<<....>>>.<<....>>.<<<.>>>...<<<.>>>.<<<..>>>.<<....
>>.<<<...>>>...<<...>>.<<<....>>>.<<......>>.<<<...>>>...<<...>>.<<<<<<<<<->>+<]>-[+<<<->[-]+>
[-]<<[>-]>[>>>>>>...>>>....<<<.>>>.<<<..>>>.<<.>>...<<....>>.<<<.....>>>.<<.>>..<<....>>.<<<..
...>>>.<<.>>.<<....>>.<<<.....>>>.<<......>>.<<<<<<<<<->>+<]>-[+<<<->[-]+>[-]<<[>-]>[>>>>>>...
.>>>.<<.>>...<<<.>>>.<<<..>>>.<<....>>.<<<...>>>...<<...>>.<<<....>>>.<<....>>.<<<.>>>...<<.>>
.<<<....>>>.<<....>>.<<<...>>>...<<...>>.<<<....>>>.<<......>>.<<<...>>>...<<...>>.<<<<<<<<<->
>+<]>-[+<<<->[-]+>[-]<<[>-]>[>>>>>>....>>>.<<.>>...<<<.>>>.<<<..>>>.<<....>>.<<<...>>>...<<...
>>.<<<....>>>.<<......>>.<<<...>>>...<<.>>.<<<....>>>.<<.>>....<<...>>.<<<....>>>.<<......>>.<
<<...>>>...<<...>>.>]]]]]]]]]]

(FYI : over 90% of above code is generated by JS code to generate part of BrainFuck code generating part of BrainFuck code generating ASCII art.)
This program gets one ASCII character ('0'~'9') and print the BF code generating the ASCII art.
Generated BF codes :
#0
++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<<.>...<.<<.>>>>.<<<..>>>>.<.<<<<.>>>>.<<<.>>>>.<<<<.>>>.<<<<.>>>>.>.<<<<..>>>.<<<<.>>>>>>.<<<...>>>.
#1
++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<<<.>.<<.>>>>>.<.<<<<.>.>>>.<<<<.>.>>>.<<<<.>.>>>>>.
#2
++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<<.>...<.<<.>....>>>.<<<<.>>.>...>>>.<<<<<<.>>>>.<<<<.>>>>>>.<<<...>>>.
#3
++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<<.>...<.<<.>....>>>.<<<<.>.>>...>.<<<<.>....>>>.<<<<.>>>>>>.<<<...>>>.
#4
++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<<.<...>.<<.>>>>.<<<...>>>.<<<<.>>>>>>.<<<...>.<<<<.>....>>>.<<<<.>....>>>>>.
#5
++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<<.>...<<<.>>>>.<<<<.>>>>>>.<<<...<.<<.>....>>>.<<<<.>>>>>>.<<<...>>>.
#6
++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<<.>...<<<.>>>>.<<<<.>>>>.<...<.<<.>>>>.<<<...>>>.<<<<.>>>>>>.<<<...>>>.
#7
++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<....<.<<.>...>>>>.<<<<<.>..>>>>.<<<<<.>.>>>>.<<<<<.>>>>>>.
#8
++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<<.>...<.<<.>>>>.<<<...>>>.<<<<.>>>>.<...>.<<<<.>>>>.<<<...>>>.<<<<.>>>>>>.<<<...>>>.
#9
++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<<.>...<.<<.>>>>.<<<...>>>.<<<<.>>>>>>.<<<...>.<<<<.>....>>>.<<<<.>>>>>>.<<<...>>>.

Example output for 7 :
----.
   /
  /
 /
'

Very nice and intuitive aproach. To bad bf-code is hard on the bytecount.

brainfuck, (BF 1534 * 5 = 7670, Generated BF = 1293, score = 8963)
+[-[>+<<]>-]>-.>>--[<+>++++++]<.>++++++>-[<+>---]<.<++..<.>--.>.<<--.>>++.<<++.>++.>.<<..>--..
........<.>..<.>++..>--.<<--.>--.<++.>......>++.<++...<.>..>--.<<--.>--.<++.>++..>++.<<.>--...
.>--.<<--.>........<++.>++.>++.<<--...>--.<<<<,+++>-[<->-----]+<[>-]>[->>>+++.-.+...---.+++.<.
>.<++..>.<.>..<--..>---.+++.<++.>.<--..>.<++..>.<.>.<--..>.<++..>.<--.>.<..>.<++..>.<--.>.<++.
.>..<--.>.<..>.<.>.<++..>-..+...<--..>.<<]<+<-[>-]>[->>++..>+++.<--..>.<.>.<++.>---.+++.<.>.<-
-..>.<++...>.<--.>.<..>.<++...>.<--.>.<..>.<++...>.<--....>.<<]<+<-[>-]>[->>>+++.-.+...---.+++
.<.>.<++...>....<--.>.<..>.<++.>.-.+...<--..>.<++.>.<..>.<--..>.<.>.<++..>...<--..>.<<]<+<-[>-
]>[->>>+++.-.+...---.+++.<.>.<++...>....<--.>.<..>.<++...>.<--..>-.+...<++.>.<--..>.<++...>...
.<--.>.<..>.<.>.<++..>...<--..>.<<]<+<-[>-]>[->>>+++.<++..>...<--..>.<.>.<++..>.<.>...<--.>.<.
.>.<.>.<++..>-.+...<.>.<--..>.<++...>....<--.>.<..>.<++...>....<--....>.<<]<+<-[>-]>[->>>+++.-
.+...<.>.<++..>.<--..>.<.>.<++..>...---.+++.<--.>.<++...>....<--.>.<..>.<.>.<++..>-.+...<--..>
.<<]<+<-[>-]>[->>>+++.-.+...<.>.<++..>.<--..>.<++..>.<--.>...---.+++.<.>.<++..>.<.>...<--.>.<.
.>.<.>.<++..>-.+...<--..>.<<]<+<-[>-]>[->>>++.+....---.+++.<.>.<++...>...<--..>---.+++.<.>.<++
...>..<--..>.<.>.<++...>.<--..>.<.>.<.>.<<]<+<-[>-]>[->>>+++.-.+...---.+++.<.>.<++..>.<.>...<-
-.>.<..>.<++..>.<--.>-.+...<++.>.<--..>.<++..>.<.>...<--.>.<..>.<.>.<++..>...<--..>.<<]<+<-[>-
]>[>>>+++.-.+...---.+++.<.>.<++..>.<.>...<--.>.<..>.<.>.<++..>-.+...<.>.<--..>.<++...>....<--.
>.<..>.<.>.<++..>...<--..>.<<]

Code here includes newlines for readability.
Try it online!

If you implement the same algorithm in a different language, you could win this challenge.

Python 3, (Python 403 * 5 = 2015, BF = 1293, score = 3308)
def x(i,b=5):
 a,i='',int(i,36)
 while i:a+='<.>+-[]'[i%b];i//=b
 return a
print(x("7vphe27p2e4voq0o43gf5n8vsm4zd01qsofpvobsaq",7)+x("20lzrlf5b9k8qf1kctot9x3et4id5d m1z11k8bye0q57c8owb 1houe4amyy3wu36tk00qz2 8o5y0gy19cx8cjsnjazb08seuk 5ypddsh5laklx2qj6sb2lxpu8cd aqma6z756nnzjalhd4fy5 aqma6z757wy8nhuw7uobp 4lbo9eqzud1ykb67x5f chin248p22jlefn4j0ottq13q chin248our8z29faeze411sy6".split()[int(input())]))

Try it online!

-18 bytes by switching to Python 2 Try it online!

GTB (GTB, 888 * 5 = 4440, BF = 1643, score = 6083)
Yes, this does run on your calculator!
~"++++++++[->+>++++>++++++>++++++>+++++++++++++++>++++++>+++++<<<<<<<]>++>>-->--->++++>->-<<<"→_`A@A=0~"<.>...<.<<.>>>>.<<<..>>>>.<.<<<<.>>>>.<<<.>>>>.<<<<.>>>.<<<<.>>>>.>.<<<<..>>>.<<<<.>>>>>>.<<<...>>>.@A=1~"<<.>.<<.>>>>>.<.<<<<.>.>>>.<<<<.>.>>>.<<<<.>.>>>>>.@A=2~"<.>...<.<<.>....>>>.<<<<.>>.>...>>>.<<<<<<.>>>>.<<<<.>>>>>>.<<<...>>>.@A=3~"<.>...<.<<.>....>>>.<<<<.>.>>...>.<<<<.>....>>>.<<<<.>>>>>>.<<<...>>>.@A=4~"<.<...>.<<.>>>>.<<<...>>>.<<<<.>>>>>>.<<<...>.<<<<.>....>>>.<<<<.>....>>>>>.@A=5"<.>...<<<.>>>>.<<<<.>>>>>>.<<<...<.<<.>....>>>.<<<<.>>>>>>.<<<...>>>.@A=6~"<.>...<<<.>>>>.<<<<.>>>>.<...<.<<.>>>>.<<<...>>>.<<<<.>>>>>>.<<<...>>>.@A=7~"....<.<<.>...>>>>.<<<<<.>..>>>>.<<<<<.>.>>>>.<<<<<.>>>>>>.@A=8~"<.>...<.<<.>>>>.<<<...>>>.<<<<.>>>>.<...>.<<<<.>>>>.<<<...>>>.<<<<.>>>>>>.<<<...>>>.@A=9~"<.>...<.<<.>>>>.<<<...>>>.<<<<.>>>>>>.<<<...>.<<<<.>....>>>.<<<<.>>>>>>.<<<...>>>.

Excellent work! :)

Thanks, I also updated the score (didn't see the language *5)

Spoon (Spoon, 7430 * 5 = 37150, BF = 1643, score = 38793)
[encoded data, 7430 characters]

Jelly, score = 5×160 + 1305 = 2105
ị“¢N=⁵ḌƤṢ§UḌ“uçCçṗ³;nƝ“nƁÇ½)|⁸jɠ9Ṁ“¡h6ịḃ⁸ƊFdṚ⁻ŀȥ“¤aÄ³ṇḃṚĠ;“&⁻3Ṃb½Ḟ\Ẇ“ÑṭȤv.Ṡ\ð⁸“¿bSumƒ¬ẹṡḢ€“¡][ḶṠ.\Ä£ḣ⁼“nƁµ[ḷSLBḃ$ŀ’ṃ“.<>”“ṁƙµ²ƭ^%n5ḅEœçs_ĊṚç⁽ƁhFġ⁷Ƈɱ’ṃ“+><-][”¤;

Try it online!
The digit is to be put in a command-line argument.
Explanation
ị“...’ṃ“.<>”“...’ṃ“+><-][”¤;   Main monadic link
ị                              Index in
 “...’                          a list of 10 integers compressed in base 250
      ṃ                        Base decompression using characters
       “.<>”                    [base 3] 1->'.', 2->'<', 0->'>'
                           ;   Prepend
                          ¤    (
            “...’               an integer compressed in base 250
                 ṃ              base decompressed using characters
                  “+><-][”      [base 6] 1->'+', ..., 0->'['
                          ¤    )

Produced brainfuck programs
+++[>+++++<-]>[>+++>++>++++++++>+>+++>+++>+++<<<<<<<-]>++>++>++++>----->------>>+.<...>.<<<.<.<..<.>>.>.<.<.<.>.>.>.<.<<.>..>.>.>.>...<.
+++[>+++++<-]>[>+++>++>++++++++>+>+++>+++>+++<<<<<<<-]>++>++>++++>----->------>>+<<<<<.>>>>>.<<<.<<<.>>.>.<<.>.>.<<.>.>.<<.>>>.
+++[>+++++<-]>[>+++>++>++++++++>+>+++>+++>+++<<<<<<<-]>++>++>++++>----->------>>+.<...>.<<<.<<....>.>.>>>.<...<.<.<.>.>.>...<.
+++[>+++++<-]>[>+++>++>++++++++>+>+++>+++>+++<<<<<<<-]>++>++>++++>----->------>>+.<...>.<<<.<<....>.>.<<.>>>>...<<<.>.<<....>.>.>.>...<.
+++[>+++++<-]>[>+++>++>++++++++>+>+++>+++>+++<<<<<<<-]>++>++>++++>----->------>>+.<<<<<...>>>>>.<<<.<.<...>.>.>.>...<<<.>.<<....>.>.<<....>>>.
+++[>+++++<-]>[>+++>++>++++++++>+>+++>+++>+++<<<<<<<-]>++>++>++++>----->------>>+.<...<<.<.>.>.>...>.<<<.<<....>.>.>.>...<.
+++[>+++++<-]>[>+++>++>++++++++>+>+++>+++>+++<<<<<<<-]>++>++>++++>----->------>>+.<...<<.<.>.<.>>>...>.<<<.<.<...>.>.>.>...<.
+++[>+++++<-]>[>+++>++>++++++++>+>+++>+++>+++<<<<<<<-]>++>++>++++>----->------>>+<....>.<<<.<<...<.>>>.<<..<.>>>.<<.<.>>>.>.
+++[>+++++<-]>[>+++>++>++++++++>+>+++>+++>+++<<<<<<<-]>++>++>++++>----->------>>+.<...>.<<<.<.<...>.>.<.>>>...<<<.>.<.<...>.>.>.>...<.
+++[>+++++<-]>[>+++>++>++++++++>+>+++>+++>+++<<<<<<<-]>++>++>++++>----->------>>+.<...>.<<<.<.<...>.>.>.>...<<<.>.<<....>.>.>.>...<.

Explanation of brainfuck programs
The common part adds the number 3, then multiplies by 5 to get 15, then multiplies by some constants and adds some constants to get all the characters used in the ASCII art. (I used a Python program to determine 15 as the optimal number.)
The differing parts simply walk around the characters and print them. The order of the characters was chosen to make the walk as short as possible.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Program that determines whether an int is greater or lesser
Write a program which prompts a user to input two integers A and B, the program should determine whether A is greater than or lesser than B without the use of greater than [>] or less than [<] operators (and similar operators or methods like .compare) and should output :
Integer A is greater than B.

Rules  : No Brainfuck.

Should work for negative numbers.  Signed int. Code's for equality isn't necessary.
Edited Again.

Is this supposed to be code golf? Otherwise it's a trivial question.

What size int? Signed or unsigned? And where's the challenge? Looks pretty trivial to me.

Actually, as written, return a!=b could be argued to meet the spec (it determines whether a is (greater than or less than) b).

As it stands this is too underspecified to make a viable problem in my eyes. −1 from me until this is rectified.

I take back the bit about being pretty trivial, given the number of people submitting buggy answers.

I've edited the Q

Why do we need to say that A is greater than B and B is less than  A? Surely one can't be true without the other?

Oh. Crap. Sorry.

What size int? What if they're equal?

Does this include bit shift operators (<< and >>)?

does min fall into "and similar operators or methods like .compare" ?

Of-course, it does.

Why no brainfuck? What exactly is a "similar" operator to < and >?

Javascript
Here's the basic format of all the solutions.  This case returns true if a>b and false otherwise:
function greaterThan(a,b){
    c=a;//Copy a
    while(true){
        if(b==a){
            return false;
        }
        if(b==c){
            return true;
        }
        a++;//Approaches b if a<b
        c--;//Approaches b if a>b
    }
}

Warning:  Since we didn't need to support the A==B case, the next 3 solutions will lock up for those inputs.  Thus, don't fill in equal or empty numbers at the prompts in the test fiddles, unless of course you like pushing red buttons that say "Do NOT push!!!"
149 chars - Fiddle: Conforms EXACTLY to specs ;)
for(A=B='A',C='B',a=c=prompt(A),b=prompt(C);b!=c++||(B=C),b!=a--||(A=C),A==B;);alert("Integer "+B+" is Greater than "+A+".\n\n\nRules  : No Brainfuck.")
74 chars - Fiddle: Prompts user for 2 numbers, alerts '-1' if 1st<2nd, '1' if 2nd>1st:
for(A=0,a=c=prompt(),b=prompt();b!=c++||(A=-1),b!=a--||(A=1),!A;);alert(A)

54 chars - Fiddle: Function that takes 2 parameters and returns true if A > B, false if A < B, and, of course, locks up if A==B.
function a(a,b){for(c=a;b!=++a&&b!=--c;);return b!=a;}

How about with decimals?

"Function that takes 2 parameters and returns true if A > B, false if B < A"   ... A>B and B<A are the same thing :)

@imoda: The current solution definitely won't work with decimals.  However, it could be modified to work with decimals to a certain precision by adding/subtracting by that precision instead of 1.  However, because JavaScript uses floats, the max number you can check will approximately be multiplied by that precision.  e.g. 1000000000000001==1000000000000001, 10000000000000001==10000000000000000, 1.000000000000001==1.000000000000001, 1.0000000000000001==1

Although this is not a code golf question, I would like to challenge you :) function a(a,b){return((a-b)/Math.abs(a-b))==1} - 47 bytes.

@pimvdb:  Challenge accepted!  Not sure if Math.abs is allowed, but if so how about:  function a(a,b){return a-b-Math.abs(a-b)} - 41 bytes, or if false and true are required:  function a(a,b){return 0==a-b-Math.abs(a-b)} - 44 bytes

@Briguy37: Nicely found. Math.abs is perhaps not completely fair, but you win anyway.

@pimvdb: Also, just found function a(a,b)a-b-Math.abs(a-b) - 32 bytes, but that only works in Firefox :)

Python
from sys import argv as s
a,b=int(s[1]), int(s[2])
if a==b:
 print 'They are the same!'
else:
 print 'Integer A is greater than B.' if (abs(a-b)==a-b) else 'Integer B is greater than A.'

Python -  73 characters
if inputs as arguments is acceptable as 'input', it is only 73 characters:
def c(a,b):
 if a==b:
  return 'They are the same!'
 else:
  return 'Integer A is greater than B.' if (abs(a-b)==a-b) else 'Integer B is greater than A.'

if the weak inequality is all we care about, and we don't have to take input, it's shorter (33 characters):
print a if (abs(a-b)==a-b) else b

"Write a program" would seem to imply that more than a function is required. But then it's code-challenge rather than code-golf, so length isn't so important.

good point. I switched the order of my responses.

btw.: It's not a golf.

What output do you get for 2000000000, -2000000000?

"Integer A is greater than B."

C
#include<stdio.h>

int main(int argc, char** argv) {
    int a, b;
    long long c;
    double d;
    printf("A: ");
    scanf("%d", &a);
    printf("B: ");
    scanf("%d", &b);
    c = (long long)a - (long long)b;
    if (c == 0) {
        puts("Integer A is equal to B.");
    }
    else {
        d = *(double*)&c;
        if (d == d) {
            puts("Integer A is greater than B.");
        }
        else {
            puts("Integer B is greater than A.");
        }
    }

    return 0;
}

It was golfed but then I realized this wasn't a golf. So now it's not. ;)
To understand how this works, you have to understand how numbers are integers and floats are represented, bitwise, and how the CPU operates on them.
I'm starting out by getting two 32-bit signed integers. They are stored as ints to bound the input. I then cast them to long longs, basically converting them to 64-bit integers, and then subtract. This subtraction is important. If A is larger than B, the result will be positive. If they're equal, the result is 0, and if B is larger than A, the result is negative. The negative case is the key, here, because of how it's represented as an integer in memory. A negative integer is stored as a 2's complement, and since these are 64-bit integers, we'll have at least one DWord of 1s in the MSBs in memory. I then store that into a 64-bit double variable, turning it into a double value with the same bit encoding. If it is negative, this double value is a NaN. By IEEE floating point rules, comparing a NaN with itself will always result in false, which indicates that A < B.
And of course, a simple zero check can add an equivalence check to the algorithm.
EDIT: This now works for very large and very small ints. It requires a 64-bit compiler, where long long is defined as having a size of 8 bytes. Unfortunately, gcc in Cygwin didn't do the trick, so I had to use Visual Studio. But, it works. This, I found, does not work for very large and very small 32-bit integers. I will be investigating a solution.

When the CPU operates on a NaN, it will flip some of the bits to be only the ones that need to be 0 for it to be considered a NaN. Doesn't this depend on the compiler flags and processor? There are different types of NaN for a reason.

@joey, @Peter Taylor: c = (long long)a - (long long)b; well, how is that different than my (removed) suggestion?

@Harry, it's promoting the 32-bit ints to 64 bits before doing the subtraction. That guarantees that it will stay in range.

@Peter Taylor: we don't understand each other :lol: What if a and b are defined as long long in the first place (now they are limited to values between INT_MIN - INT_MAX). Even with the revised specs I could for example legitimately claim that restricting the input values to such a small range is a bigger flaw than defining a and b as long long and don't check for overflowing. You see what I'm saying here? Unless you input a and b as strings to be converted later you can't control overflowing against the maximum representable integer in C.

@Peter Taylor It may, though this is default behavior for the Visual Studio compiler. At my workplace, we had to do some major modifications to our C/C++ code because of how NaNs were clobbered when passing them through the ALU (we needed the bits to be preserved). I didn't have to pass any special compiler flags to cl when building this code.

@Harry K. How would restricting them to 32-bit ints at input be a bigger flaw? The original specs call for two integers, not two long longs. Therefore, restricting them at input is fine. It may not be the most user-friendly (if you enter a larger number, it won't notify you) but in the end, the only input space we care about are within [INT_MIN, INT_MAX].

@Peter Taylor I just thought about this some more and no, it wouldn't really depend on special compiler flags as far as I know. QNaNs and SNaNs are always treated a certain way by the ALU in the CPU, and I don't believe that there's any way to change that, even programatically.

In theory there are traps you can set up, but I don't know whether the CPUs in actual use make them available, and if so whether compilers do. OTOH I've thought about it some more too and it's irrelevant whether the NaN is normalised or not, because it will still compare to be different to itself anyway.

@Peter Taylor, that is correct. You reminded me of that fact. It actually was something that I was unsure about, but I figured posting my reasoning here would clarify it. Happy coincidence that it worked. :) I confirmed that from Wikipedia (http://en.wikipedia.org/wiki/NaN#Floating_point). I'll update the reasoning to reflect this.

@sidran32: How would restricting them to 32-bit ints at input be a bigger flaw? The original specs call for two integers, not two long longs But, long longs are integers too :) The whole point is that in my eyes most of our efforts should not get shifted towards handling overflows, thus treating the key question as if it has a secondary role instead of being the protagonist. Anyway, Joey rolled back my original answer, making me happy again :) Nevertheless, it's always a pleasure to have discussions like these, I think we all benefit from them.

@Harry K. Ya, they are integers. Though in a programming context, I typically associate "integer" to mean a 32-bit integer type. Most languages that have an 'int' or 'integer' primitive assign it as such, so that assumption is valid, in my opinion. Though of course it would be better to be explicit if the poster specified the size in the requirements. :P And such discussions are always beneficial, so I agree with you there.

Python
r="less"
try:(input()-input())**.5;r="greater"
except:pass
print "Integer A is",r,"than B"

Scala
Based on the revised question:
object G extends App
{
    def g(i:BigInt,j:BigInt)=
    {
        def q(a:BigInt,b:BigInt):String=
        {
            if(a==0)
                "Integer B is greater than A."
            else
                if(b==0)
                    "Integer A is greater than B."
                else
                    q(a+1,b-1)
        }
        if(i!=j)q(i-j,i-j)else"A and B are equal"
    }
    val(a,b)=(readLine("A: ").toInt,readLine("B: ").toInt)
    println(g(a,b))
}

The numbers should be read from the user somehow, at least that's how I understand »a number inputted«.

 scala G A: 2000000000 B: -2000000000 Integer B is greater than A.

@user unknown I've changed to BigInts to solve that, but when the numbers get that big, it's probably to slow to be useful anyway. Which is why they invented < and > I guess.

Since most of the questions about the spec have been answered, here's a solution in C#. If the size of the ints isn't 32-bit then int needs changing for a suitable type.
namespace Sandbox {
    class Program {
        private static int _Compare(int a, int b) {
            if (a == b) return 0;
            int sgnA = (a & int.MinValue) == int.MinValue ? -1 : 1;
            int sgnB = (b & int.MinValue) == int.MinValue ? -1 : 1;
            // If they have different signs then the negative one is smaller.
            if (sgnA != sgnB) return sgnA;
            // If they're both non-negative then the difference won't overflow.
            // If they're both negative, then the different won't overflow. Worst case is (-1) - int.MinValue = int.MaxValue
            return ((a - b) & int.MinValue) == int.MinValue ? -1 : 1;
        }

        public static void Main(string[] args) {
            if (args.Length == 0) {
                // Test mode.
                int[] cases = new int[] {
                    int.MinValue,
                    int.MinValue + 1,
                    int.MinValue + 2,
                    int.MinValue / 2 - 2,
                    int.MinValue / 2 - 1,
                    int.MinValue / 2,
                    int.MinValue / 2 + 1,
                    int.MinValue / 2 + 2,
                    -2, -1, 0, 1, 2,
                    int.MaxValue / 2 - 2,
                    int.MaxValue / 2 - 1,
                    int.MaxValue / 2,
                    int.MaxValue / 2 + 1,
                    int.MaxValue / 2 + 2,
                    int.MaxValue - 2,
                    int.MaxValue - 1,
                    int.MaxValue,
                };
                foreach (int _a in cases) {
                    foreach (int _b in cases) {
                        int _cmp = _Compare(_a, _b);
                        Console.WriteLine(string.Format("{0}\t{1}\t{2}\t{3}", _a, _b, _cmp, _cmp == _a.CompareTo(_b) ? "OK" : "Error"));
                    }
                }
            }
            eise if (args.Length != 2) {
                Console.Error.WriteLine("Expected two arguments.");
            }
            else {
                int a, b;
                if (!int.TryParse(args[0], out a) || !int.TryParse(args[1], out b)) { Console.Error.WriteLine("Both arguments must be integers"); return; }

                int cmp = _Compare(a, b);
                Console.WriteLine(cmp == -1 ? "Integer A is less than B" : cmp == 0 ? "Integer A equals B" : "Integer A is greater than B");
            }
        }
    }
}

All of the test cases pass.

Scala:
object G extends Application {
  def g (a: Byte, b: Byte) = (a & -128, b & -128) match {
        case (0, 0) => if (((a - b) & -128) != 0) "<" else ">"
        case (x, 0) => "<"
        case (0, x) => ">"
        case _ => if (((b-a) & -128) != 0) ">" else "<"
  }
  val r = g (readByte, readByte)
  println ("A is " + (if (r==">") "greater than" else "less than") + " B")
}

Since ints vary from language to language, I choosed Bytes here, because it allowed me to do exhaustive testing.
Of course it can easily be adapted to short/int/long, with Int.MIN_VALUE etc. instead of -128.
The 4 cases test for

both values are positive
only first
only second
none of them

It took me 60 minutes to golf it down to 297 chars, until I noticed, that it isn't a golf! And another 10 minutes for hitting 80x undo (real programmers don't do backups).

Javascript: (108 chars without spaces)
function C(a,b) {
    var d=a-b,
        z=!!(d/Math.abs(d)+ 1),
        m=z?a:b,
        n=z?b:a;
    return 'Integer '+m+' is greater than '+n;
}

tests:
console.log( C (1, 3) );    // Integer 3 is greater than 1
console.log( C (3, 2) );    // Integer 3 is greater than 2
console.log( C (-3, -8) );  // Integer -3 is greater than -8
console.log( C (-9, 0) );   // Integer 0 is greater than -9

Code for equality is not required, so I didn't do it.

Ada, 76 Characters
function C(A,B:Integer)return Integer is
begin return (A-B)/abs(A-B);end C;

returns -1 for A smaller than B, and 1 for A bigger than B.
for A=B an exception will be raised, but the behaviour in this case isn't specified in the task description.

D (51 chars)
int d(int a,int b){return a-b?(a-b)&-1<<31?-1:1:0;}

using signed representation
returns -1,0,1 for less than, equals to and greater than resp.
with reading from user: 91 chars
import std.stdio;void main(){int a,b;readf("%d %d",&a,&b);writeln(a-b?(a-b)&-1<<31?-1:1:0);}

This isn't a golf, but you can shave a char by using (a-=b)?a ... (May not work in D, I'm not too familiar with it. Unfortunately it seems D has a boolean type, but otherwise you could shave chars by flipping your logic: d(a,b){return(a-=b)&1<<31?-1:!!a;}

PHP
PHP's too verbose for a task this simple, but I'm in PHP mode so I'll go ahead:
function d($a,$b){return $a-$b;}
// Returns a negative number if $a < $b, positive if $a > $b, 0 if $a == $b

If you need it to always return the same values, then
function d($a,$b){return ($d=$a-$b)?$d/abs($d):0;}
// Returns -1 if $a < $b, 1 if $a > $b, 0 if $a == $b

If you want it to output text, you could do something like:
function d($a,$b){$d=$a-$b;echo !$d?'equal':(abs($d)==$d)?'greater than':'less than';}

0/0 doesn't give an error of some kind? Also, have you considered test cases near the extremes? I bet you've got a few overflow bugs.

True, but the problem isn't very well-defined as it is. I'll fix the 0/0. I haven't tested extreme cases, but maybe PHP's BC Math extension can fix those...

The numbers should be read from the user somehow, at least that's how I understand »a number inputted«.

Well, I guess PHP is out of the running now since the question requires prompting the user.

Objective-C - 161 chars + full string
This solution prompts the user, gets the value, and then returns the full string.
Usage - self-explanitory, it requests a with 'a?' and then once inputted, requests b with 'b?'.
int a,b,x;char c='A';NSLog(@"a?");scanf("%i",&a);NSLog(@"b?");scanf("%i",&b);
x=(a-b/abs(a-b)==1);NSLog(@"Integer %c is greater than integer %c.",c+!x,c+x);

And readable version (with whitespace)
int a,b,x;
char c = 'A';
NSLog(@"a?");
scanf("%i", &a);
NSLog(@"b?");
scanf("%i", &b);
x = (a-b/abs(a-b) == 1);
NSLog(@"Integer %c is greater than integer %c.", c+!x, c+x);

Output:
Computer: a?
Me: 2
Computer: b?
Me: 3
Computer: Integer B is greater than integer A.

Haskell, 150 characters
main=putStr.g.f.map read.words=<<getLine
f[a,b]|b`elem`dropWhile(/=a)[(minBound::Int)..]="BA"|0<1="AB"
g[x,y]="Integer "++x:" is greater than "++y:"."

I could use Integer and do subtraction, but I felt like dealing with overflow problems that arise from using Int.
Note there is a < in the code, but it is used to compare a constant expression (one character less than writing True).

C
void AgB(int a, int b) {
(( 2 * a + 1) / (2 * b + 1) == 0) ? printf("Integer B is greater than A\n") : printf("Integer A is greater than B\n");}

Python alt-way
#!/usr/bin/python

import sys
a, b = map(int, sys.argv[1:3])
s = '==' if (a == b) else '<' if (str(a-b)[0] == '-') else '>'
print 'a(%d) %s b(%d)' % (a, s, b)

If equility is not matter, just doing sorted([A,B]) != [A,B] should do, so
a=[input(),input()];print"A is "+["less","great"][sorted(a)!=a]+"er than B"

Tests
>>> a=[input(),input()];print"A is "+["less","great"][sorted(a)!=a]+"er than B"
1
2
A is lesser than B
>>> a=[input(),input()];print"A is "+["less","great"][sorted(a)!=a]+"er than B"
2
1
A is greater than B
>>> a=[input(),input()];print"A is "+["less","great"][sorted(a)!=a]+"er than B"
-1
-2
A is greater than B
>>> a=[input(),input()];print"A is "+["less","great"][sorted(a)!=a]+"er than B"
-2
-1
A is lesser than B

Python, 152 characters
Conforms to the letter with the specification.
No cheating with conditionals of any kind, including equality. The abs call probably has a conditional hidden, if I weren't golfing I would do x/=int(math.sqrt(x*x)) as the third line.
i=input
x=i("A")-i("B")
x/=abs(x)
print "Integer",chr((131-x)/2),"is greater than",chr((131+x)/2)+".\n\n\n\nRules  : No Brainfuck."

BF, handles negative zero
I figured it would be fun to invent a language for the job, using characters < and > for something completely unrelated to inequality comparison.
# parse first number (space delimited)
+>,---------------------------------------------
[<->[->+<]]<[->+>,---------------------------------------------<<]>
>+++++++++++++[
  <<[->>>+<<<]>>----------------
  [-<<+>>]>[-<<<++++++++++>>>]<
  ,--------------------------------]
# parse second number (newline delimited)
+>,---------------------------------------------
[<->[->+<]]<[->+>,---------------------------------------------<<]>
>+++++++++++++++++++++++++++++++++++[
  <<[->>>+<<<]>>--------------------------------------
  [-<<+>>]>[-<<<++++++++++>>>]<
  ,----------]
# handle minus signs
<[<<[-<[->+<]>>[-<<+>>]<[->+<]>>-<<]>>[-<[-]<<+>>>]]
<<[-<[-]>>+<]
# compare
<+>>+[-<<-[>]>]
# report
>[[-]++++++++++++++++++++++++++++++
     ++++++++++++++++++++++++++++++.<]
<<<[[-]+++++++++++++++++++++++++++++++
       +++++++++++++++++++++++++++++++.>]

For a brief summary of operators: < and > move the cursor backward/forward; +/- increment/decrement the value of the number pointed to by the cursor (hereafter referred to as "the accumulator"); [] iterate while the accumulator is non-null; , reads a byte from input to the accumulator; . writes the accumulator to the output.  Anything else is ignored, which provides a cool way to implement comments, that can even be made to look like comments in other scripting languages.
Handles negative numbers by checking for the following cases:

if both numbers are signed negative, swap them
if only one number is negative, zero it out and increment the other one
else just leave them alone

This lets us compare zero with negative zero (-0 < 0).  Equality is not handled.
Funny how I/O takes more than twice the space the math does.

Python, 86
a,b=input('A,B')
print 'Integer A is %s than B.'%('less'if abs(a-b)-a+b else'greater')

 FORTRAN 77
I guess good old Fortran arithmetic if does not violate the requirements of the question.
Here it is
      PROGRAM TEST
      READ *, A
      READ *, B
      IF (B-A) 99,100,101
99    PRINT *, 'Integer A is greater than B'
      GOTO 102
100   PRINT *, 'they are equal'
      GOTO 102
101   PRINT *, 'Integer B is greater than A'
102   STOP
      END

C# approach with 44 chars. I just subtract a from b and check if there is a minues in the result string:

bool c(int a, int b){return ("" + (b - a))[0] == 0x2d;}

0x2d could be replaced with "-"! -1 char

C (K&R) - 49 chars
This is indeed trivial...
a,b;main(){scanf("%d%d",&a,&b);printf("%d",a-b);}

negative result if a > b, positive if a < b, 0 if equal
EDIT: This answer corresponds to the very first specs of the question, when golfing was required and the output was not restricted to specific phrases.

Undefined behavior if a-b overflows.

@joey: tsk, tsk... too picky! The problem doesn't talk about overflows/underflows and the author didn't answer to the relative question. If you have a better suggestion which checks input against the range INT_MIN to INT_MAX without using > or < I'd be happy to see it. Until then I consider your down-vote to be rather harsh! Keep also in mind that there will always be at least one number that overflows any of the built-in data types on input, no matter what data type you choose to represent a and b.

UB is a rather special case for C and derivates, but as long as your using signed ints and do that subtraction you have UB. Which means that there are inputs where your method isn't guaranteed to give the correct result. Just because over-/underflows are defined in other languages doesn't make it ok to rely on that in C, in my eyes. But agreed, the question is underspecified in any case. The easiest fix, conforming to the question would probably be to make a and b unsigned (where it is defined).

@joey: but then you rule out negative numbers both on the input and on the result, which someone could legitimately consider it to be a bigger flow than not checking for overflows. Plus, you don't solve the over/underflow problem either.

@Harry, surely the best approach is to wait until the question is properly specified? That's why I've asked for clarifications. (NB I haven't downvoted any of the answers, but I may come back later and downvote anything which fails the obvious test cases).

I hear you Peter, but I feel it's unfair to down-vote for a non-solvable side-effect, without providing an equal or better solution to the given problem. Anyway, this was supposed to be fun, but it's not... I'm withdrawing my code, waiting for your better solutions...

Well, I think the spec is close enough now that I've posted a C# solution. Easily ported to C. Avoids underflow / overflow.

@Peter Taylor: alas, the only way to control over/underflow in C is to read the numbers as strings and then convert them to integers with either one of the stro?() family of functions or a custom one. That's why you saw me reacting so strongly about that down-vote :)

I think you misunderstood Joey. He's clearly talking about arithmetic overflow caused by the subtraction being e.g. 0x80000000 - 1, not about input parsing.

I got what Joey said, but accepting that as a flaw we can also accept no input overflow check as a flow. My point is that imho both of those are away from the very essence of the given problem. I could present a full blown program taking care of a hell lot of stuff, but I think this is not what code golfing is about. Handling overflows can be easily put as a separate problem by itself (especially in C).

Harry, you can delete the post on your own. See the "delete" option next to the "edit" button?

Surely handling overflow is the essence of the problem. Without that it's a "challenge" consisting of "Can you tell whether an int is negative without using < or >?"

@dmckee: yes, I found it, but if it's not inappropriate for the post to stay like this, it contains some interesting commentary going on I think. Peter, we just have a different point of view, nevertheless the author changed the specs so golfing is not required any more, so full-blown programs can be presented now (which is not that interesting anymore, imho).

Delete it or revert it.  As-is it's not an answer.

I rolled back the answer.  As for the discussion, it's only broken when a and b are unreasonably large, and the asker did not specify the range of integers that must be supported.  Code Golf answers are usually not held to this high of a standard.  Oh, and you can save one character by putting a,b in the parameter list of main :-)

Thanks Joey, you made me a happy man again :) Btw, Pelles-C on the PC doesn't really like arbitrary arguments in main, actually it doesn't even compile them. I happily accept 1 char overhead in favor of portability :)

Haskell - 18 characters
main=print.compare

Returns GT if a > b, LT if a < b.
Or since this question's output is completely unspecified, I can do
main=print.(-)

which returns a negative number if a < b, or a positive number if a > b.
EDIT: I didn't see what the exact output has to be (see below)
main = print.f
f x y|q==GT=g b|q==LT=g c where q=compare x y
a="Integer A is "
b="greater than"
c="less than"
e=" B."
g x=a++x++e

BTW, this golf sucks.

What does it return if a==b? And how does it get its input? I only ask because I know nothing about Haskell.

compare would return EQ if a==b.

This will read two Integers and print Integer A is greater than B.?

Dang. This doesn't count. Revised the question

Did you not see the part where it said you can't using inbuilt compare functions?

He revised the question after I submitted this.

Perl
for(0..9){
 $s.=("2"x$_)."1".("0"x(9-$_))
}
for(0..9){
  $a=$_;
  for(0..9){
   $c[$a][$_]=chop$s
  }
}
$_=<>;
$b=<>;
$l=length;
$_="0"x length$b.$_;
$b="0"x$t.$b;
for(1..$l){
 $e.=chop;$f.=chop$b
}
$g="Integer A is";
$h=" than Integer B";
for(1..$l){
 $t=$c[$_][$b];
 if($t==2){die"$g less$h"}
 if($t==0){die"$g greater$h"}
}

This creates a look-up array for all of the comparisons of each digit. It then takes two unsigned integers as input. It makes them the same length. It then compares them one digit at a time using the look-up array. I am sure it could be made a lot shorter.

JavaScript (65)
Enter in Mozilla Firefox's Web Console:
'Integer A is '+(eval(prompt())>>>31?'less':'greater')+' than B.'

The user should separate the two signed integers (which should each fit in 31 bits) with " - ". The program takes the difference and checks the sign bit.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
400th Question Celebration/Challenge
I just looked and saw that there are 399 questions on this wondrous "Programming Puzzles & Code Golf" site!!!  That means that...THIS IS THE 400th question!!!  To celebrate this momentous occasion, here are your goals:

Write a piece of code that is EXACTLY 400 bits.

That's right...BITS!!!
For the risk of redundancy and the sake of clarity, that's 50 bytes!!!

Because this occasion is so extraordinarily meaningful, each bit and therefore each byte must also be meaningful!

In other words:  You can't just name a variable aaaaa because you needed 32 extra bits to get to 400.  However, you can rename it to party as long as that is a meaningful name for that variable.

Your program must do something appropriate (not necessarily output something appropriate) to celebrate this grand occasion!

For example:  You could choose to make a program that outputs 400. However, I must needs state that although submitting code that does only that would meet this requirement, it would also be like celebrating your birthday party at home by yourself sick in bed.  At least you celebrated, but hey: You can do better!!!

The most creative code wins!!!  In this case, creativity will be measured by votes.
This contest will last until 400 users have viewed this question.  If there is a tie when the 400th user views this question, the contest will go into sudden-death overtime until there is a clear winner

Oh, and lest I forget...HAPPY 400th QUESTION!!!

I added the tag code-shuffleboard, as someone suggested on meta.

it's not the 400th question anymore :(

20 Users to go!  Get your votes in!

I think I'm the 400th viewer.

Wow, looks like this thing is going into sudden death overtime:  In corner 1, weighing in at 7 votes, we have cemper93 with his triumphant triangle wave, and in corner 2, also weighing in at 7 votes, we have user unknown with his bodacious birthday candles!  Let the death-match commence!

I'm closing this question as off-topic because rules 2 and 3 do not constitute objective validity criteria.

@MartinEnder I would have closed as too broad instead.

Python, FOUR HUNDRED bits
i=0
while 1:print" "*(i%8>3 and-i%4 or i%4),0;i+=1
At first I wanted to make a sine scroller, but there was no place for the import. Now you get a bugged triangle wave. ~~~party~~~

Fixed version: while 1:print" "*[i%8,-i%4 or 4][i%8>3],0;i+=1

 Brainf*ck
[-]>++++[<+++++++++++++>-]<.----..---------------.

And the output will be: 400!

Ruby
1.upto(side=gets.to_i){|i|puts (?**i).center side}

This creates a wobbling tree, like the following:
   *
  **
  ***
 ****
 *****
******
*******

Scala gratulates with 400 Bits:
(1 to 400).map(x=>print("""
 ,
|_|
"""))

Sample:
 ,
|_|

 ,
|_|

 ,
|_|

 ,
|_|

... due to restrictions, I couldn't light bigger candles. I try to compensate with the scheer number.

By my count that is only 304 bits (38 Bytes).  This question will have to take a DEEP breath to blow out all these candles, though...Nice!

You're right, I picked the wrong variant, which only had 39 Bytes (38?), but had the problem, that the lower candles melted the upper ones. We absolutely need a bigger vertical distance to prevent London-like-lightenings.

Here's a variation with 400 bits and 400 candles in a square: for(i<-1 to 20;x<-Seq(" ,  ","|_| "))println(x*20) :)

you lost a blank: for(i<-1 to 20;x<-Seq(" ,  ","|_| "))println(x*20) - oh, I lost it too! A bug?

JavaScript, 400 bits
Code
for(i=0,a='';i<400;)a+='\n!'+i++;alert(a+"\n400!")

Output
!0
!1
!2
!3
..
..
!398
!399
400!

Or, how it is read in English:  "not 0, not 1, not 2, not 3 .. not 398, not 399, 400!"
Update
Just realized I forgot to attach the Fiddle for this problem!

HTML
(bad HTML!)
<marquee style="font-size:400px">~!400!~</marquee>

Python
50 characters or 400 bits as metered by other submissions.
i,j=1,1
while len(str(i))<81:
 print i
 i,j=j,i+j

Simple fibonacci calculator, which terminates once the output no longer fits in a standard 80x60 terminal. Not especially festive I know, but the best I could come up with on short notice. More to follow!

Here comes C#!
class P{static void Main(){System.Console.Write("400!");}}

Ok, that is the smallest, running / valid, and remarkable thing i could squeeze out of .NET! But it fails by 13bytes! (code is 63bytes). Someone might suggest an improvement :D
Maybe using the roman numeral version might slash off an extra byte :-)
class P{static void Main(){System.Console.Write("CD!");}}

Bits of code, or bits compiled?
Ah well, I see nobody has posted any x86 yet, so here goes...
x86
4D 5A 90 00 03 00 00 00 40 00 00 0F FF F0 00 0B 80 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

IDK if this counts, it's the first 400 bits (in hex) of a Win32 PE executable
VB.NET
Sub Main()
    Console.WriteLine("400 CodeGolf")
End Sub

Yet another Python answer.
k=(1,)
while len(k)<400:k+=(sum(k[-2:]),)
print(k)

Print the first 400 Fibonacci numbers. I notice one of the other Python answers also does the Fibonacci sequence... Oh well. I came up with this method of calculating Fibonacci numbers while working on another code golf and I thought it was neat so I figured I'd answer anyway.

Ada
with P;procedure C is begin P("400! Yay!");end C;

assuming there is a package p:
$ cat p.ads
procedure P(S:String);
$ cat p.adb
with Ada.Text_IO;
procedure P(S:String) is
begin
   Ada.Text_IO.Put_Line(S);
end P;

If I put with Text_IO; and Text_IO.Put("") into the source code I would already exceed the limit by 7 bytes, without outputting anything.. Ada is hard to golf.

I put in a clarification to the question so you don't have to worry about importing input/output libraries.  Hope this helps!

Shells with banner installed
banner -w80 HAPPY  HAPPY  HAPPY  400th  QUESTION!

Perl
$number_400=400;
$and_still_number_400=$still_number_400*4/4;
$when_is_the_500_post="In 100 posts!!";
print $number_400*400/400;

#      # ########## ##########
#      # #        # #        #
#      # #        # #        #
######## #        # #        #
       # #        # #        #
       # #        # #        #
       # #        # #        #
       # ########## ##########

This solution isn't the required length (400 bits).

On my computer, it shows up exactly 400 bits.

you mean 400 bytes?

@bcc32: My laptop says 400 bits. IDK what is wrong.

That's one modern laptop you got there, we're still stuck with 64bit CPU's... :(

@st0le: IDK lol

Perl /*Life:Eat,sleep,then die */
$rip=400;$pork="Pi";chop($pork);sleep($rip);die();

...- is V, so currently it looks like it prints V000 400 times.

Yup it surely does..'....-' = 4. Missed a dot. That exceeds my bit limit..back to the drawing board


text:
Enumerate all binary trees with n nodes
Given an integer n, enumerate all possible full binary trees with n internal nodes. (Full binary trees have exactly 2 children on every internal node). The tree structure should be output as a pre-order traversal of the tree with 1 representing an internal node, and 0 representing an external node (Null).
Here are examples for the first few n:

0:
0
1:
100
2:
11000
10100
3:
1110000
1101000
1100100
1011000
1010100
This is a code golf with the prize going to fewest characters. The trees should be output one per line to stdout. The program should read n from the commandline or stdin.

I was thinking about that problem when I was trying to make a maze-like writing system

What is the standard deadline before declaring a solution?

Would there be any interest in doing a slight variation of this problem, where the output was required to be ordered, and streaming?

@Kyle Butt Just my opinion, but I don't think I'd be interested. For me, part of the fun with these problems is trying alternative approaches, and requiring a certain order would likely limit the number of viable algorithms.

Perl - 125 79 chars
Count includes 4 chars for "-ln" options.  Takes n from stdin.
New constructive approach:
@a=0;map{%a=();map{$a{"$`100$'"}=1while/0/g;}@a;@a=keys%a}1..$_;print for@a

Form the solution for n by substituting a new internal node ("100") for each leaf ("0"), in turn, in each tree from the solution for n-1.
(I owe this concept to other's solutions that use the internal node to leaf [100->0] substitution for verifying sequentially-generated strings, and I believe I saw--after writing my answer based on that concept--this same 0->100 method of construction in someone's intermediate edit.)
Previous recursive approach:
sub t{my$n=shift;if($n){--$n;for$R(0..$n){for$r(t($R)){for$l(t($n-$R)){push@_,"1$l$r"}}}}else{push@_,"0"}@_}print for t$_

Recursive ungolfed:
sub tree {
  my ($n) = @_;
  my @result = ();
  if ( $n ) {
    for $right_count ( 0 .. $n-1 ) {
      for $right ( tree( $right_count ) ) {
        for $left ( tree( ($n-1) - $right_count ) ) {
          push @result, "1$left$right";
        }
      }
    }
  }
  else {
    push @result, "0";
  }
  return @result;
}
foreach $tree ( tree($_) ) {
  print $tree;
}

PHP (142) (138) (134) (113)
Runs from the command line, i.e. "php golf.php 1" outputs "100".
EDIT: Cut 4 characters with an alternate method, building up the strings from 0 rather than recursing down from $n. Uses PHP 5.3 for the shortened ternary operator; otherwise, 2 more characters are needed.
EDIT 2: Saved 4 more characters with some changes to the loops.
EDIT 3: I was trying a different approach and I finally got it below the old method.
All of the trees can be considered as binary representations of integers between 4^n (or 0, when n=0) and 2*4^n. This function loops through that range, and gets the binary string of each number, then repeatedly reduces it by replacing "100" with "0". If the final string is "0", then it's a valid tree, so output it.
for($i=$p=pow(4,$argv[1])-1;$i<=2*$p;){$s=$d=decbin($i++);while($o!=$s=str_replace(100,0,$o=$s));echo$s?:"$d\n";}

Ruby, 99 94 92 89 87 characters
(n=4**gets.to_i).times{|i|s=(n+i-1).to_s 2;t=s*1;0while s.sub!'100',?0;puts t if s==?0}

The input is read from stdin.
> echo 2 | ruby binary_trees.rb
10100
11000

Edit 1: Changed IO (see Lowjacker's comments)
b=->n{n==0?[?0]:(k=[];n.times{|z|b[z].product(b[n-1-z]){|l|k<<=?1+l*''}};k)}
puts b[gets.to_i]

Edit 2: Changed algorithm.
b=->n{n==0?[?0]:(k=[];b[n-1].map{|s|s.gsub(/0/){k<<=$`+'100'+$'}};k.uniq)}
puts b[gets.to_i]

Edit 3: The version now takes the third approach (using the idea of migimaru).
Edit 4: Again two characters. Thank you to migimaru.

It would be one character shorter to accept input from stdin.

Also, you don't need the *?\n, because puts prints each element of the array in its own line.

I just started trying to learn Ruby, but I think you can save a character by using 0while instead of {}while. At least it works in NetBeans.

Also, sub! is sufficient here instead of gsub!, so that's another character you could save.

@migimaru You are right with both of your comments. Thanks a lot.

If we don't care about running time, I found that this approach can be cut to 82 characters by working in base 10 instead of base 2.

Ruby 1.9 (80) (79)
Using the non-recursive, constructive approach used by DCharness.
EDIT: Saved 1 character.
s=*?0;gets.to_i.times{s.map!{|x|x.gsub(?0).map{$`+'100'+$'}}.flatten!}
puts s&s

Haskell 122 chars
main=do n<-readLn;mapM putStrLn$g n n
g 0 0=[['0']]
g u r|r<u||u<0=[]
g u r=do s<-[1,0];map((toEnum$s+48):)$g(u-s)(r-1+s)

Since the IO is a non-trivial portion of the code in haskell, maybe someone can use a similar solution in another language.
Essentially random walks in a square from bottom left to top right stopping if the diagonal is crossed. Equivalent to the following:
module BinTreeEnum where

import Data.List
import Data.Monoid

data TStruct = NonEmpty | Empty deriving (Enum, Show)
type TreeDef = [TStruct]

printTStruct :: TStruct -> Char
printTStruct NonEmpty = '1'
printTStruct Empty = '0'

printTreeDef :: TreeDef -> String
printTreeDef = map printTStruct

enumBinTrees :: Int -> [TreeDef]
enumBinTrees n = enumBinTrees' n n where
  enumBinTrees' ups rights | rights < ups = mempty
  enumBinTrees' 0   rights = return (replicate (rights+1) Empty)
  enumBinTrees' ups rights = do
    step <- enumFrom (toEnum 0)
    let suffixes =
          case step of
            NonEmpty -> enumBinTrees' (ups - 1) rights
            Empty -> enumBinTrees' ups (rights - 1)
    suffix <- suffixes
    return (step:suffix)

mainExample = do
  print $ map printTreeDef $ enumBinTrees 4

Note that I don't intend to accept this as the answer, just thought  I would toss mine out there.

Golfscript, 60 83
~[1,]\,{;{[:l.,,]zip{({;}{~:a;[l a<~1 0.l a)>~]}if}/}%}/{n}%

I built a golfscript mode for Emacs for working on this, if anyone's interested.

Haskell, 54 bytes
t 0=["0"]
t n=['1':l++r|m<-[0..n-1],l<-t m,r<-t$n-1-m]

Try it online!

Scala, 115 bytes
It reminds me of Catalan number.

Golfed version. Try it online!
n=>n match{case 0=>Seq("0");case _=>(for(m<-0 until n)yield{for{l<-t(m);r<-t(n-1-m)}yield "1"+l+r}).toList.flatten}

Ungolfed version. Try it online!
object Main {
  def t(n: Int): List[String] = n match {
    case 0 => List("0")
    case _ =>
      (for (m <- 0 until n) yield {
        for {
          l <- t(m)
          r <- t(n - 1 - m)
        } yield "1" + l + r
      }).toList.flatten
  }

  def main(args: Array[String]): Unit = {
    (0 to 3).foreach(n => println(t(n)))
  }
}


text:
Lights Out - Find the solution
(This code golf task is related to Code-Golf: Lights Off!. The same puzzle is used, but the task is different.)

Introduction
"Lights Out" is a puzzle in which you should switch off all lights in a 5x5 grid. However, when you swap a light from on to off, or from off to on, the four adjacent lights will swap as well!
For example, consider the following grid, in which 1 stands for a light switched on and 0 stands for a light switched off:
00000
00000
00110
01000
00101

Now, if you try to turn the light at row 4, column 2 off, the resulting map will be:
00000
00000
01110
10100
01101

The goal of this game is to turn all lights off. You are allowed to switch certain lights on if that helps you to find the solution, as the adjacent ones will swap as well, which makes it possible to switch others off. This is almost always required to find the solution in fact!
Description
Your task is to find out, given an input grid, which lights should be swapped to switch all lights off. Which ones to swap is enough information to solve the puzzle, because due to the swapping the amount does not matter (you can always do mod 2 so it will be 0 (effectively, don't swap) or 1 (effectively, do swap)), and the order of swapping does not matter either obviously.
Input
Input is a two dimensional array of lengths 5 (5x5) which represents the grid, in which:

0 stands for a light switched off
1 stands for a light switched on

Output
Output is another two dimensional array of lengths 5 (5x5) which represents which lights to swap to switch all lights off in the grid, in which:

0 stands for 'this light should not be swapped'
1 stands for 'this light should be swapped'

Winning condition
Shortest code wins.
Hints
There are several algorithms to find the solution. There are mathematical articles about this game available on the Internet.
Important notice
Sometimes multiple solutions are possible. It depends on the algorithm what solution you'll end up with. If you have different but correct solutions to the examples below, your entry obviously is correct as well.
Examples
Example 1 (video to illustrate):
Input:     Output:

00000      00000
00000      00000
00110      00000
01000      00110
00101      00001

Example 2 (video to illustrate):
Input:     Output:

11111      11000
11111      11011
11111      00111
11111      01110
11111      01101

isn't that nearly the same anyway? there's no difference between lights out and going from one set to another (xor the from and to boards)

@ratcet freak: I'm not sure if I understand you. Solving the puzzle is not as trivial as xoring.

going from the other puzzle to the this one is

@ratchet freak: The other question is just about pressing certain lights while this one is about switching all lights off. You might want to try solving one at http://www.ebaumsworld.com/games/play/1111/.

think about what the diff is (lights remaining the same color/lights needing to switch)

Is it a promise that there's solution?

Ruby (130) (121) (113) (102)
EDIT: Saved 9 characters, thanks to Howard.
EDIT 2: Another 8 characters, courtesy of Howard.
EDIT 3: Saved 11 more characters after learning how to use Ruby's % operator for sprintf.
b=(0..4).map{gets.to_i 2}
32.times{|x|z=0;k=b.map{|i|x=z^i^31&(x<<1^x>>1)^z=x;'%05b'%z}
puts k if x<1}

Accepts 5 lines of input from stdin. Outputs all solutions as 5x5 grids as specified, though there are no extra line breaks between solutions (or between the input and the solutions).
Solutions are found by iterating through all 32 possibilities for the top row, since the top row determines the switches that must be flipped in the following rows.
Input:
00000
00000
00110
01000
00101

Output:
00000
00000
00000
00110
00001
01110
10101
11011
10011
01111
10101
10101
00000
10011
10100
11011
00000
11011
00110
11010

You don't need brackets around 0..4 - 2 characters. Also the 0b-prefix is not neccessary - 7 characters.

Nice. It's also fast and does not hang if there is no solution.

@Howard Thanks for the tips! I'm still learning my way around Ruby :)

Some others: x==0 is equivalent to x<1 in your case - 1 character. You don't have to take the i-loop and can use b.map{} directly - 3 characters. But this means you can get rid of r completely - 2 characters. Also formatting of output can be done a bit more efficiently: (z+32).to_s(2)[1,5] - 2 characters.

@Howard Thanks again! I'm definitely learning to appreciate the trickiness of golfing in Ruby :)

Ruby, 133 characters
t=->z,v,s{v<0?z&33814345664<1&&s :t[z,v-1,s+?0]||t[z^4321<<(v+v/5),v-1,s+?1]}
puts t[32*$<.read.tr(?\n,?0).to_i(2),24,''].scan /.{5}/

This is a brute-force search through all possible on/off combinations. The input must be specified on stdin with exactly five lines of five 0/1 characters each and a newline after each one, e.g.:
> ruby lights.rb
11111
11111
11011
11111
11111
^Z
00000
11111
10001
11111
00000

F#
brute-force,
will golf later
open System;
let a = Array2D.create 5 5 false
let b = Array2D.create 5 5 false

for i = 0 to 4 do
  for j = 0 to 4 do
    a.[i, j] <- if Console.Read() = 49 then true else false
  Console.ReadLine() |> ignore

let r = Random()
while Seq.cast a |> Seq.exists id do
  let x, y = r.Next(5), r.Next(5)
  b.[x, y] <- not b.[x, y]
  for u, v in [ x, y;
                x - 1, y;
                x + 1, y;
                x, y - 1;
                x, y + 1 ] do
    try
      a.[u, v] <- not a.[u, v]
    with
    | _ -> ()

printfn "%s" (let mutable z = ""
              for i = 0 to 4 do
                for j = 0 to 4 do
                  z <- z + (if b.[i, j] then "1" else "0")
                z <- z + "\n"
              z)

"will golf later" (5 years later) :)

@HyperNeutrino still waiting... :]