zombie
0fe2d7cf14
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
19 lines
354 B
C
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;
|
|
}
|