Branch interview question

Create a random integer generator function with an upper bounds parameter.