Chapter 12: Problem 3
Write a code segment that searches a two-dimensional array for a negative integer. The loop should terminate at the first instance of a negative integer in the array, and the variables row and col should be set to its position. Otherwise, if there are no negative integers in the array, the variables row and col should equal the number of rows and columns in the array (we assume that each row has the same number of columns).
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.