01-04-2010, 08:46 PM
Heya, I was wondering if there was a way I could check if the value of a number is even or odd numbered through scripting. Is there? If so, how do I do it? :o
|
|
|
01-04-2010, 08:46 PM
Heya, I was wondering if there was a way I could check if the value of a number is even or odd numbered through scripting. Is there? If so, how do I do it? :o
01-04-2010, 09:07 PM
There has gotta be a simple MACL def to handle odd/even checking. Something like:
if my_test_value.is_a?(odd_value) or something
01-04-2010, 09:15 PM
Code: if number%2==0
01-04-2010, 09:28 PM
*Smacks forehead*
The % Remainder symbol. I totally forgot. Yep. That'll do it.
01-04-2010, 10:06 PM
pwnt.
(I didn't see that coming, thought it was a trick question :l) |
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| firestalker5 | 8 | 14,648 |
04-25-2011, 10:04 AM Last Post: deValdr |
||
| desbrina | 5 | 10,228 |
06-20-2010, 09:58 PM Last Post: deValdr |
||
| Charlie Fleed | 6 | 12,390 |
01-21-2010, 06:26 PM Last Post: DerVVulfman |
||
| Twin Matrix | 4 | 12,335 |
01-04-2009, 05:35 PM Last Post: Twin Matrix |
||