simple while loop explanation

January 30 2010 by Christopher2222 3129
false

0


I was playing around with loops and came up with this simple while loop that is reacting different than I am expecting

a:=rand(1..10):
while a() <> 4 do print(a()); od:

the output includes 4's ??

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account