Anonymous user
Talk:Minimum positive multiple in base 10 using only 0 and 1: Difference between revisions
Talk:Minimum positive multiple in base 10 using only 0 and 1 (view source)
Revision as of 14:10, 3 March 2020
, 4 years ago→How does it work "C code for Ed Pegg Jr's 'Binary' Puzzle algorithm" ?
Line 53:
count=0;
for(ten=1,x=1;x<=n1;x++){
//ten == (10^x-1)%num
val[x]=ten;
int mod = ten;
for(j=0;j<n1;j++){
if(pow[j]&&pow[j]!=x&&!pow[mod])
pow[mod]=x;▼
mod++;
if(mod==num)
}
if(!pow[ten])
pow[ten]=
ten=(10*ten)%num;
if(pow[0])
break;
Line 97:
:I've added a reference "How to find Minimum Positive Multiple in base 10 using only 0 and 1" which I think helps.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 13:49, 3 March 2020 (UTC)
:Thanks, that helps allot --[[User Horst.h|Horst.h]] 14:09, 3 March 2020 (UTC)
== general observations ==
|