fixed bug line 22 for input -1
result of random array hidden as comment