Rewrite the above so that it is a method search
that will return the location of any desired element in
the array, or a -1 if the element is not present. The function
should have parameters a the array,
size meaning that the seach occurs from position
0 to position size - 1 and
a parameter val which is the value to look for.
Then the solution to part 1 just becomes:
int loc = search(a, 100, 0.0);
if (loc == -1) System.out.println("No zeros");
else System.out.println("Zero found");