Question
TRBL is a 2D Array in which the array elements on the diagonals from top-right to bottom-left (TRBL) are identical. In the following figure, a
TRBL is a 2D Array in which the array elements on the diagonals from top-right to bottom-left (TRBL) are identical.
In the following figure, a 4x7 2D array is given for you. Here, this special feature is given in the colors. The 2D array elements are equal if they have the same color:
Write a complete C program to determine whether a given 2D Array is a TRBL or not. The output should be either "TRBL" or "NOT TRBL". Read the 2D Array size m and n from the user at first, then get the 2D Array elements from the user one by one. After that process the given 2D array and print "TRBL" or "NOT TRBL" on the screen.
For example:
Input Result NOT TRBL 33 1 2 3 4 5 6 7 8 9 5 4 TRBL 6 7 8 9 7 8 9 2 8 9 2 4 9 2 4 1 2 4 1 5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started