Create usingsemaphores.c

This the solution to the problem using semaphores