diff --git a/README b/README deleted file mode 100644 index 358e113..0000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ -# code - -`cc main.c -std=c99 -o golfing --include stdio.h --include string.h --include ctype.h --include stdlib.h -ansi -fpermissive -w && ./golfing` \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..f805953 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Code golfing +Here's a small collection of my codegolfing attempts. diff --git a/addition-repl/.gitignore b/addition-repl/.gitignore new file mode 100644 index 0000000..76d4bb8 --- /dev/null +++ b/addition-repl/.gitignore @@ -0,0 +1 @@ +add diff --git a/addition-repl/README b/addition-repl/README new file mode 100644 index 0000000..988b8c2 --- /dev/null +++ b/addition-repl/README @@ -0,0 +1,3 @@ +# code + +`cc main.c -std=c99 -o add --include stdio.h --include string.h --include ctype.h --include stdlib.h -ansi -fpermissive -w && ./add` diff --git a/main.c b/addition-repl/main.c similarity index 100% rename from main.c rename to addition-repl/main.c diff --git a/min.c b/addition-repl/min.c similarity index 100% rename from min.c rename to addition-repl/min.c diff --git a/lion.c b/lion.c deleted file mode 100644 index 7f9fdfc..0000000 --- a/lion.c +++ /dev/null @@ -1 +0,0 @@ -main(){int s,r;for(;;s=0){char l[99],*p,*q=0;if(scanf("%s",l)!=1)return -1;p=l;r=0;for(;*p;++p){if(!isdigit(*p)&&*p!=43&&*p!=10)return -1;s<1?isdigit(*p)&&(s=1)+(q=p):*p==43||*p==10?r+=atoi(q+(s=0)):0;}r+=atoi(q);printf("%d\n", r);}} \ No newline at end of file