- #1
needhelp83
- 199
- 0
Ok, I am brand new at this so I am kind of confused how to figure this out.
I know that with nested loops that n goes to a power of 2, but it states that in my problem. What exactly am I missing and how do I show each step?
Code:
i [tex]\leftarrow[/tex] n
while i >= 1
j [tex]\leftarrow[/tex] i
while j <= n
<body of the j loop>, needs (1)
j [tex]\leftarrow[/tex]j*2
end j while
i [tex]\leftarrow[/tex]i-1
end i while
I know that with nested loops that n goes to a power of 2, but it states that in my problem. What exactly am I missing and how do I show each step?