aleph
24th December 2008, 09:12 AM
Inspired by this (http://www.gnu.org/fun/jokes/happy-new-year.cfbC.html), I wrote a piece of very simple code today that says "Merry Christmas" in 2 languages.
The code goes like this:
#include <stdio.h>
#define main() int main(void){printf("Merry Christmas and Happy New Year!\n From C land, with love.\n");return 0;}
#define BE_HAPPY /*
def main(): print "Merry Christmas and Happy New Year!\n From Python land, with love."
#*/
main()
http://img372.imageshack.us/img372/7753/polyglotcm1.gif (http://img372.imageshack.us/my.php?image=polyglotcm1.gif)
It can either be compiled with GCC or be interpreted by Python.
The code goes like this:
#include <stdio.h>
#define main() int main(void){printf("Merry Christmas and Happy New Year!\n From C land, with love.\n");return 0;}
#define BE_HAPPY /*
def main(): print "Merry Christmas and Happy New Year!\n From Python land, with love."
#*/
main()
http://img372.imageshack.us/img372/7753/polyglotcm1.gif (http://img372.imageshack.us/my.php?image=polyglotcm1.gif)
It can either be compiled with GCC or be interpreted by Python.