Advanced number system!

Hi devs. I’m sure you saw this post: Help with handwritten advanced number system
Some satire(or whatever this called) that many people didn’t understand.

So here’s program she probably made it with. (i mean she definetely not handwrote this, but maybe her program was not on C)

How to use: Download > unzip > run > type max number > enjoy.
Script will be saved in folder with program

Approximate output file size formula: MaxNumber * 40

Program: Parity.zip (436.8 KB)

Source Code (C)
#include <stdio.h>
#include <stdint.h>

uint64_t Amount;
uint8_t Even = 0;

int main() {
    printf("Type max supported number: ");

    scanf("%i", &Amount);
    if (! Amount) {
        printf("Bad input\n");
        return 0;
    }

    FILE *Script = fopen64("NumberSystem.lua", "wt");
    if (! Script) {
        printf("File creating error\n");
        return 0;
    }

    fprintf(Script, "local function Parity(Number)\n\tif Number == 0 then\n\t\treturn true\n");

    for (uint64_t i = 1; i <= Amount; i++) {
        fprintf(Script, "\telseif Number == %i then\n\t\treturn %s\n", i, Even == 1 ? "true" : "false");
        Even ^= 1;
    }

    fprintf(Script, "\telse\n\t\tprint(\"Unsupported number\")\n\tend\nend");


    fclose(Script);
}

Important!

Never trust random internet users! (and me is not excetion)
Do not run exe files unless you sure it’s safe!
Even if person who sent it provided source code, this doesn’t mean program isn’t malware!
Better to check and compile source code by yourself, if you don’t know how - learn. I can help.

If you want ask why i made this - for fun, for practice, for history, to engage luau scripters try low level like C

3 Likes

I think you misspelled this one- Anyways, good to see you making custom systems like this.