From af9bc53703a917d07ce0239206f0443be3e9ed20 Mon Sep 17 00:00:00 2001 From: poyo Date: Sat, 18 Jul 2026 22:50:10 +0200 Subject: [PATCH] structure --- README | 3 --- README.md | 2 ++ addition-repl/.gitignore | 1 + addition-repl/README | 3 +++ main.c => addition-repl/main.c | 0 min.c => addition-repl/min.c | 0 lion.c | 1 - 7 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 README create mode 100644 README.md create mode 100644 addition-repl/.gitignore create mode 100644 addition-repl/README rename main.c => addition-repl/main.c (100%) rename min.c => addition-repl/min.c (100%) delete mode 100644 lion.c 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 -- 2.51.2