Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 Re: Coder's Corner » How many times will the innermost loop...HELP ME!! » 2011-05-29 19:23:57

hiya. thanks for welcoming me big_smile, this place is cool.

I'm not clear with, if a=b, c=d, what will happen to the loop?

thanks again

#2 Re: Coder's Corner » How many times will the innermost loop...HELP ME!! » 2011-05-29 19:09:19

I have the same problem but different different values [assume a,b,c,d are all +ve]:

assume a ≤ b and c ≤ d

for j= a to b
   for h = c to d
        [Statements in body]
   next h
next j

yikes hmm..should there be more than 1 answer..?

Board footer

Powered by FluxBB