Write a subroutine in C# called checkTreasure that will count the number of treasure chest symbols ('T') on a map grid.
An example of the 2D array islandMap is shown in Figure 1.
Figure 1
| 0 | 1 | 2 | 3 | |
|---|---|---|---|---|
| 0 | 'W' | 'L' | 'T' | 'W' |
| 1 | 'T' | 'W' | 'L' | 'W' |
| 2 | 'L' | 'L' | 'T' | 'T' |
The subroutine should:
islandMap of characters as a parameter'T' characters in the islandMap arrayJackpot if there are five or more 'T' symbols in the array'T' symbols if there are fewer than five 'T' symbols in the array.You must write your own count routine and not use any built-in search or count functions that might be available in C#.
You should use meaningful variable name(s) and C# syntax in your answer.