Can anybody give me some tip or help me with some part of this problem, thank you.
Write a program which creates N new threads (N is the command line argument). Every thread in the single of M seconds (M is also command line argument) generates random prime number which writes also.
./a.out 3 6
thread tid=4, number=22973
thread tid=5, number=10477
thread tid=6, number=25763
thread tid=4, number=7297
thread tid=5, number=15461
thread tid=6, number=28163
thread tid=5, number=28771
thread tid=6, number=15803
thread tid=4, number=11149
thread tid=6, number=19379