C_dumping-ground/3x+1andfriends.c
zombie 0fe2d7cf14 i wanted to write c again and i found this folder on my computer
i rearranged some shit and started actually making 3xplus1.c
i consider 3xplus1.c to be complete (maybe) and there is also hello.c that is complete
@quantum teach me c pl0xpl0xpl0xpl0xpl0xpl0xpl0xpl0xpl0xpl0xpl0x
2022-01-22 06:00:21 -05:00

19 lines
354 B
C

#include <stdio.h>
char *libz_atoi(char *dicks);
int main() {
char *dicks = "!123";
long x = 76;
while(x != 1) {
if(x % 2 == 0) {
x /= 2;
}
else {x = (x * 3) + 1;}
printf("%ld\n", x);
}
printf("%s\n", dicks);
char *dick2 = libz_atoi(dicks);
printf("%d\n", dick2);
return 0;
}