Homework 4

Name: Multi-threaded application
Points: 3
Type: Solitaire assignment. Everybody solves it alone!

Assignment

Write a simple program which spawns 3 threads. These threads cooperate on generating numbers from 0 to 50 and printing them on standard output in the following form:

Thread 1: 0
Thread 1: 1
Thread 3: 2
Thread 2: 3
...
Thread 3: 49
Thread 1: 50

Additional instructions and useful hints

Please keep in mind the following facts when dealing with the solution: