In this assignment you will be working on the program FindNeg, it will have an array filled with different ints. Your jo
Posted: Fri Jul 01, 2022 5:37 am
In this assignment you will be working on the program FindNeg, it will have an array filled with different ints. Your job is to find the total number of negatives in the array. The process to the solution is really simple. For starters, create the program with the basic outline, make sure you are saving it to the correct directory. From there define an array with the numbers as such: From there, you will need a counter for the total negatives in the array. In order to check each element of the array, be sure to have a loop that will iterate through each one; and decide if the element is a negative, then increment your counter. For example, the output of the program should be: {2, 4, 6, -1, 10, -20, 16, -3, 8} "There were <numOfNegs> negatives in the array!" Re-cap O Declare an array of integers O Walk through the array and find the negatives Print the results of the number of negatives O