View Single Post
Old 2016-12-03, 16:16   #3
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Out of my Body

23×79 Posts
Default

Here is a pseudocode for clarification:

My array tasks[26]
forstep (j=0, 2197, step =13)
. {
. Print j in binary
. Flag=0
. Exp=0
. While(flag=0)
. {
. Exp= exp +1
. If(j/(2^ exp)==j\(2^ exp))
. {
. Tasks[Exp]=+
. Flag=1
. }
. }
. }

For (k=1,26)
. {
. Print tasks[k]
. }


I would expect only tasks 1 to 13 to be nonzero and equal to the value if the step was equal to 1

Last fiddled with by a1call on 2016-12-03 at 16:18
a1call is offline   Reply With Quote