Programming Assignment 1

In this assignment you will write a concurrent TCP server using fork(). The server will chose a random integer number between 1-100, and wait for the clients to send their guesses. The number of clients is pre-determined, say 2. But your code should be easily modified and be able to run for different number of clients. As enough number of clients send their guesses, the server finds out which one of the clients' guess is -closest- to its (server's) number. Finally, the server sends a greeting message to the winner client, and other clients should print a phrase indicating that they lost the competition.

Hints:

 

DUE DATE FOR SECTION 22: Sunday, Jan 30, 11:59 PM

IMPORTANT NOTICE: The turn-in folders are already created. Please turn-in to correct section. We will match with the roster that we have and if you have submitted to wrong folder (by mistake or on purpose) you will not receive a grade for this assignment.