added code to display numbers using rand()