[<prev] [next>] [day] [month] [year] [list]
Message-ID: <52ebf588-d092-ea5e-9c17-6576832d01ae@gmail.com>
Date: Mon, 6 Jul 2020 02:59:44 +0100
From: Andre Coelho <andrealbergaria@...il.com>
To: linux-kernel@...r.kernel.org
Subject: new binary algorithm
hey,
for those who read my email, i upgraded tjhe algorithm
here it is
#include <stdio.h>
// The algorithm works by first getting a base of 0000, and change one
bit at a time (0001,0010,etc);
// Then it uess a base of 1111 and change one bit at a time
(1110,1101,etc...)
int main() {
char zeros[] = { '0','0','0','0','0','0','\0'};
char ones[] = { '1','1','1','1','1','1','\0'};
printf("\n%s",zeros);
int iterator;
for (iterator=0 ; iterator < (sizeof(zeros)-1) ;
iterator++) {
zeros[iterator] = '1';
printf("\n%s",zeros);
zeros[iterator] = '0';
}
printf("\n%s",ones);
for (iterator=0 ; iterator < (sizeof(ones)-1);
iterator++) {
ones[iterator] = '0';
printf("\n%s",ones);
ones[iterator] = '1';
}
}
Powered by blists - more mailing lists