IBM interview question

verify random genration