View Single Post
Old 05-01-2008, 04:48 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,694
redhead is on a distinguished road
Think about the values here
Code:
While (start <= 100)
  num = start  # num and start equals 0
  While (start Mod 5 = 0)  # 0 mod 5 is 5, this is never entered
    start = start / 5  # 0/5 is 0 start is still 0
    i += 1 # i is incremented 1, but since we never entered, it will never be incremented
  End While
  start = num # since num is the orriginal start value, start is still 0
  While (start Mod 2 = 0)  # 0 mod 2 is 2, this is never entered
    start = start / 2 # 0/2 is 0, start will never change
    start += 1 # start is incremented, but since we never entered start never gets incremented
  End While
End While
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote