Create rand.c

Generating random numbers and inverting