if you have a 2 digit variable, and you want to split it up to 2 different numbers, like for example 37, and you wanna split it into 3, and 7, is there a code to do that for any 2 digit #? O_O
Offline
You can do it using the "mod" block to give you remainders.
xx mod 10 gives you the remainder when XX is divided by 10 - which will be the units.
(xx - (xx mod 10) ) / 10 will give you the 10s.
(by subtracting the units first, instead of using mod 100, you avoid rounding errors)
Offline