* new binary algorithm
@ 2020-07-06 1:59 Andre Coelho
0 siblings, 0 replies; only message in thread
From: Andre Coelho @ 2020-07-06 1:59 UTC (permalink / raw)
To: linux-kernel
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';
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-06 2:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-06 1:59 new binary algorithm Andre Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox