diff --git a/data/bit_1.c b/data/bit_1.c new file mode 100644 index 0000000..0296a4a --- /dev/null +++ b/data/bit_1.c @@ -0,0 +1,16 @@ +#include +#include + + +int main(int argc, char *argv[]) { + + char x = 0; + if (argc) + x = strtoq(argv[1], NULL, 16); + + if (x & 1) + printf("ma\n"); + else + printf("fe\n"); + return 0; +} diff --git a/data/bit_2.c b/data/bit_2.c new file mode 100644 index 0000000..f55e44f --- /dev/null +++ b/data/bit_2.c @@ -0,0 +1,18 @@ +#include +#include +#include + +int main() { + char s[3] = ""; + int x; + strcpy(s, getenv("CODE")); + + x = strtoq(s, NULL, 16); + + x = x >> 2; + if (x & 1) + printf("ha\n"); + else + printf("nh\n"); + return 0; +}