You have posted the query as an article in the Article / Source code section. I have moved it to the Queries and discussion forum.

No you have not messed the stuff its just one logical error.

lowest should be initialized to one of the element rather than 0
Code:
lowest = quantityOfPets[1];
Also loop till all the elements and not till <6
Code:
for(i = 1; i<7; i++)