From: Andre Coelho <andrealbergaria@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: new binary algorithm
Date: Mon, 6 Jul 2020 02:59:44 +0100 [thread overview]
Message-ID: <52ebf588-d092-ea5e-9c17-6576832d01ae@gmail.com> (raw)
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';
}
}
reply other threads:[~2020-07-06 2:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52ebf588-d092-ea5e-9c17-6576832d01ae@gmail.com \
--to=andrealbergaria@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox