Demo entry 6684557

t

   

Submitted by anonymous on Dec 16, 2017 at 11:06
Language: C. Code size: 293 Bytes.

void truth_combine(int n)
{
    char* r[] = { "false", "true" };
    int t = 1 << n;
    int i = 0;
    int j = 0;
    
    for(; i < t; ++i) {
        printf("<");
        for(j = 0; j < n; j++)
            printf("%s, ", r[!!(i & (1 << j)) ]);
        puts("\b\b>");
    }
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).