Infosys interview question

Write random number generator code