This material is part of the course Practical Introduction to Parallel Programming and meant for educational purposes only.
Task
Implement a program in which the main threads spawns a number of child threads.
The main thread should pass an integer rank - ranging from zero to the number of threads minus one - to each child thread.
Each child thread should print its rank.