Skip to content

Instantly share code, notes, and snippets.

Created January 11, 2014 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/8376364 to your computer and use it in GitHub Desktop.
Save anonymous/8376364 to your computer and use it in GitHub Desktop.
VARIABLES
a
b
counter = 0
result = 0
innercounter = 0
END
counter = b + 0
WHILE counter != 0 DO
innercounter = a + 0
WHILE innercounter != 0 DO
result = result + 1
innercounter = innercounter - 1
END
counter = counter - 1
END
PS X:\cljwhile> lein run .\multiply.while
Initial value for a: 32
Initial value for b: 4
Result value for a: 32
Result value for b: 4
Result value for innercounter: 0
Result value for counter: 0
Result value for result: 128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment