summaryrefslogtreecommitdiff
path: root/fqq.c
diff options
context:
space:
mode:
authorjstmax! <maxwasmailed@proton.me>2025-11-03 21:59:06 +0100
committerjstmax! <maxwasmailed@proton.me>2025-11-03 21:59:06 +0100
commit831dde51fe075e7a0ae679cd0fe65b2c8c5378b8 (patch)
tree0f97e2150715c08961ace021a0829c38f12b92e6 /fqq.c
parentd17a8b6aa9cb128c47d7f6c5414a786e336e430c (diff)
added a shitty obfuscated calculator i made in C (fqq.c)
Diffstat (limited to 'fqq.c')
-rw-r--r--fqq.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/fqq.c b/fqq.c
new file mode 100644
index 0000000..ad03dc5
--- /dev/null
+++ b/fqq.c
@@ -0,0 +1,39 @@
+#ifndef FQQ
+#define FQQ
+#define P(a,b) a b
+#define P3(a,b,c) a b c
+#define P4(a,b,c,d) a b c d
+#define G(a,b) a##b
+#define G3(a,b,c) a##b##c
+#define G4(a,b,c,d) a##b##c##d
+#define CCCP argc
+#define VVVP argv
+P3(extern,int,printf)();/**/P3(extern,int,scanf)();
+P3(extern,int,strcmp)();/**/P3(extern,char,*strcpy)();
+P3(extern,double,pow)();/**/P3(extern,int,atoi)();
+P(int,main)(P(int,argc),P(char,**argv)){
+P(int,x)=0;P(int,y)=0;
+P(double,s)=0;
+P(char,op[32]);
+if(CCCP==4){
+P3(x,=,atoi(VVVP[1]));
+strcpy(op,VVVP[2]);
+y=atoi(VVVP[3]);
+}P(else,if)(CCCP>4){
+G(pri,ntf)("argc%cerror.\n",32);
+}P(else,if)(CCCP<4){
+G(pri,ntf)("Xyz\nX?%c",32);
+G(sca,nf)("%d",&x);
+G(pri,ntf)("%d%cY%cz\nY?%c",x,32,32,32);
+G(sca,nf)(" %s",op);
+G(pri,ntf)("%d%c%s%cZ\nZ?%c",x,32,op,32,32);
+G(sca,nf)("%d",&y);}
+if(strcmp(op,"+")==0){s=x+y;}
+P(else,if)(strcmp(op,"-")==0){s=x-y;}
+P(else,if)(strcmp(op,"*")==0/**/||/**/G(str,cmp)(op,"x")==0){s=x*y;}
+P(else,if)(strcmp(op,"/")==0) {if(y==0) {G(pri,ntf)("fqq>%cfuck%cyou\n",32,32);P(return,420);}s=x/y;}
+P(else,if)(strcmp(op,"^")==0){s=pow(x,y);}
+G(pri,ntf)("%d%s%d=%f\n",x,op,y,s);
+P(return,(int)s);}
+#endif
+