Computer Science, asked by ashimkhan2345, 30 days ago

int result = 0;
for (int j = 0; j < number.length; j++) {
if (number[j] < 0) {
result = result + 1;
}
}
Group of answer choices

to find the smallest number in the array

to add 1 to each of the negative numbers in the array

to count the negative numbers in the array

to sum the negative numbers in the array

to find the index of the first negative number in the array

Answers

Answered by sameerkrdbg
1

Answer:

To count the negative numbers in the array

Explanation:

As in line 3 it is checking numbers which are smaller than 0.

So, it is checking negative numbers in an array.

Mark as brainliest

Similar questions
Math, 15 days ago