Skip to content

Commit e39cef8

Browse files
committed
2 parents 649715e + cdf7f5b commit e39cef8

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Brainfuck is a turing-complete, esoteric language that uses only 8 commands.
44

55
# HOW DO I BRAINFUCK?
66

7-
mempo = memory pointer
7+
> mempo = memory pointer
88
99
The instructions for writting in brainfuck are the following:
1010

11-
'''
11+
```
1212
+ --> Adds 1 to the value on the mempo is in.
1313
1414
- --> Removes 1 to the value on the mempo is in.
@@ -24,14 +24,14 @@ The instructions for writting in brainfuck are the following:
2424
[ --> Starts a loop.
2525
2626
] --> Ends a loop if the value of the mempo it's in equals to 0, otherwise it restarts.
27-
'''
27+
```
2828

2929
Every character other than those is (hopefully) ignored.
3030

3131
# ERRORS
3232
If it doesn't work, depending on the return it can be the following:
3333

34-
'''
34+
```
3535
0 - No problems on the code, check it's well written or mail me.
3636
3737
1 - There is an unfinished loop, somewhere.
@@ -47,4 +47,4 @@ If it doesn't work, depending on the return it can be the following:
4747
6 - 2 & 4
4848
4949
7 - 1 & 2 & 4
50-
'''
50+
```

main.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,6 @@
22
#include <stdlib.h>
33
#include <string.h>
44

5-
#define LENGTH 9999
6-
7-
/*
8-
* How does brainfuck work?
9-
* + -> changes the value of the cell by 1
10-
* - -> changes the value of the cell by -1
11-
* > -> changes the cell by 1
12-
* < -> changes the cell by -1
13-
* . -> prints the int value of the cell
14-
* : -> prints the ascii value of the cell
15-
* , -> accepts int input and adds it to the cell
16-
* ; -> gets the ascii input and adds its number to the cell
17-
* [] -> loops if the value of the cell it ends on isn't 0
18-
*/
19-
205
int main(int argc, char *argv[]){
216

227
// Check if all the needed arguments are provided
@@ -32,4 +17,4 @@ int main(int argc, char *argv[]){
3217

3318

3419
return 0;
35-
}
20+
}

0 commit comments

Comments
 (0)