I have a multiple threads program, each thread calculates the GCD of two numbers and print out the result. The problem I have right now is I have to print the result in ascending order. I'm not sure how to do this. This is school assignment. we are not allowed to use any extra thread to sort the result and output and cannot do the print out in the main thread too.