Question: Write a function called GradlentCount that accepts as parameter a two-dimensional array called Matrix of size 6 by 6. The function returns how many numbers
Write a function called GradlentCount that accepts as parameter a two-dimensional array called Matrix of size 6 by 6. The function returns how many numbers in the Matrix are gradient numbers. A number in the Matrix is considered a gradient number if it matches the following two rules: 1. The numbers to the left and above the number are smaller. 2. The numbers to the right and below the number are larger. For example, the number 5 in figure 1 matches the above two rules. Bolded numbers in the example below are gradient numbers. Note: Do not check the border values i.e. skip the values in the first row, first column, last row and last column
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
