Skip to content

Instantly share code, notes, and snippets.

@dripolles
Created July 3, 2013 08:57
Show Gist options
  • Save dripolles/5916484 to your computer and use it in GitHub Desktop.
Save dripolles/5916484 to your computer and use it in GitHub Desktop.
This program prints "Hola mundo" 100 times. It works in Python, C and Brainfuck.
#define is_C 1
#ifndef is_C
#>++++[<+++++++++++++++++++++++++>-]<[>>[-]>++++[<++++++++++++++++++>-]
#<.>+++++[<++++++++>-]<-.---.-----------.[-]>++++[<++++++++>-]<.>+++++++
#[<+++++++++++>-]<.++++++++.-------.----------.+++++++++++.[-]++++++++++.<<-]
#[-][
def principal():
return
def semicolon():
return
def print_s(s):
print s
def int_a():
return
#endif
#include <stdio.h>
#define principal() main(){
#define int_a() int a = 0;
#define semicolon() ;
#define pass }
#define print_s(x) printf("%s\n",x);
principal()
int_a()
a = 100
semicolon()
#ifndef is_C
"""
# "
#endif
while(a>0){
#ifndef is_C
"""
# "
#endif
#ifndef is_C
while(a > 0):
#endif
print_s("Hola mundo")
a-=1
semicolon()
pass
pass
#ifndef is_C
#]
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment