about the possibilities with for loop(+Random function)
#2

Quote:
Originally Posted by DavidBilla
Посмотреть сообщение
Are the following for loops valid?

pawn Код:
for(new i=1;i<10;i*=2)
for(new i=100;i>10;i/=2)
for(new i=25;i>1;i%=10)
Also another doubt is,if i assign a value random(5) to a variable n make it print the number when i execute a command. If i try the command 5 times in a row, will i get completely different numbers all the time (like 1 4 2 3 0) or will any number get repeated (like 4 0 2 4 1)?
The numbers can be repeated with the random function, as it's entirely random. So there is always a chance you could have 4, 4, 4, 4, 4; but that's not likely at all.
Reply


Messages In This Thread
about the possibilities with for loop(+Random function) - by DavidBilla - 04.09.2014, 12:32
Re: about the possibilities with for loop(+Random function) - by K9IsGodly - 04.09.2014, 12:43
Re: about the possibilities with for loop(+Random function) - by JM_Millers - 04.09.2014, 12:44

Forum Jump:


Users browsing this thread: 2 Guest(s)