Added a check for the edge case of no possible profit, program will now randomly generate an array and check it