Sorting Problems
Started by Evil_Bengt, Oct 03 2014 06:35 AM
4 replies to this topic
#1
Posted 03 October 2014 - 06:35 AM
I'm having real problems with sorting numbers and stuff with lua... Is there any way to like sort 4 numbers that is in the same variable from highest to lowest... Like 9826 to 9862 and vice versa?
#2
Posted 03 October 2014 - 06:44 AM
Can we see the code that you've tried so far, and what these 'real problems' are that you've been having with them? that way we can give you better advice for your specific problem.
#3
Posted 03 October 2014 - 01:49 PM
I haven't really started on anything with that yet... It's just a fun idea I got from this vid:
https://www.youtube....h?v=d8TRcZklX_Q
I thought that I could make some fun generator with this to test numbers...
To do that one have to sort the numbers in falling order and subtract the opposite, like this example:
input: 6548
computation: 8654 - 4568
https://www.youtube....h?v=d8TRcZklX_Q
I thought that I could make some fun generator with this to test numbers...
To do that one have to sort the numbers in falling order and subtract the opposite, like this example:
input: 6548
computation: 8654 - 4568
#5
Posted 03 October 2014 - 10:06 PM
Nice, I've been reading the online lua book thingy and when you say it, I remember that I've read about that sort function! Thanks alot!
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











