The main will check if HasZeroes works correctly. Set up and call the function with the following 4 cases:
Using cout (C++) or System.out.println (Java), display the result of each call in a clear manner. For example,
for the case where 0 is the first value, you might output:
HasZeroes(<array with 0 in the first position>) = 1 // Using cout prints true as 1
Your main should not read in the values -- just hard-code the values. We are just checking our work, so we will not worry about handling input.
Note that the prototype/signature of the function is fixed and cannot be changed. You may assume that the length parameter is set correctly.
Hand in the ".cpp" (or ".java") file on Blackboard.
80% of the credit is whether the function correctly checks for zeroes and main correctly tests your function for the 4 cases listed above. If your code does not compile, you do not get any correctness points. The remaining 20% is based on programming style. Include your name in a comment on your file, indicate the date you made the last modification. Comment each function, use meaningful variable names (i as an index variable is ok, but otherwise, single letter variable names are a bad habit), use consistent indentation and provide proper spacing to make the code more readable. Never, ever, create your code in Word or another word processor.
WARNING: This is an individual assignment. Do it on your own. If you can't, ask me for help, but realize that this is something I expect you would have been able to do after your first programming course.