This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char * b = "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." - 1; | |
/* TINYBF - LLASARUS - 2016 */ | |
#include <string.h> | |
#define N(x) abs(*b-x)==1 | |
main(){char*m=calloc(1,20000),*p=m;while(*++b){p+=N(61)?(*b-61):0;*p-=N(44)?(* | |
b-44):0;if(N(92)&&*b!=91!=!*p){int c=1,x=*b-92;b-=x;while(c){c+=N(92)?(*b-92)*x: | |
0;b-=x;}b+=x;}if(N(45))(*b-46)?*p=getchar():putchar(*p);}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
unsigned int i; | |
int array[4] = {40, 20, 40, 10}; | |
for(i = 3; i >= 0; i--) | |
printf("%i\n", array[i]); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Read input until newline and translate into a number | |
, ----- ----- [ +++++ +++++ | |
> [ - > +++++ +++++ < ] | |
+++++ +++ [ - < ----- - > ] | |
< [ - >> + << ] | |
>> [ - < + > ] | |
<< , ----- ----- ] | |
Start loop and run the algorithm on each number between zero and the input number | |
>> - < [ > + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>>,----- -----[+++++ +++++>,----- -----]< | |
[<] | |
<<< | |
++++ ++++[>+++++ +++++>+++ +++<<-]>.[-]>+.[-]<< | |
+++++ +++++..----- ----- | |
>>> | |
> | |
[[-<<+>>]<[->+<]>+>] | |
<[<++++>-] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; solution to problem in pseudo code ;; | |
; maxval:=10^a-1 | |
; minval:=10^(a-1) | |
; result:=maxval-(maxval%b) | |
; read n from input: | |
; cell layout (every cell is surrounded by brackets): [n][tmp][char] | |
>>, ; goto char and take input from stdin | |
----- ----- ----- ----- ----- ----- -- ; if character is 32 (' '), stop loop before it has begun | |
[+++++ +++++ +++++ +++++ +++++ +++++ ++ ; reset character |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* DISCLAIMER: THIS IS NOT MEANT TO BE USED IN REAL PROGRAMS */ | |
int main(int argc, char ** argv) | |
{ | |
void * a = (void *)10; | |
void * b = (void *)5; | |
void * r; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%:include <stdio.h> | |
int main(int argc, char ** argv) | |
<% | |
int i; | |
char array<:8:> = <% 'H', 'E', 'L', 'L', 'O', '!', '\n', '\0' %>; | |
for(i = 0; array<:i:>; i++) | |
fputc(array<:i:>, stdout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SDL/SDL.h> | |
#include <SDL/SDL_image.h> | |
#include <math.h> | |
int quit = 0; | |
/*int screen_width = 640, screen_height = 480, screen_bpp = 32;*/ | |
int screen_width = 1280, screen_height = 720, screen_bpp = 32; | |
int char_width = 8, char_height = 12; | |
int text_width = 80; |