Sum of columns of a 2-D Matrix where first element is odd
Given a matrix mat[][], the task is to print the sum of the columns where the first element is odd. Examples: Input: mat[][] = { {8, 2, 3, 5}, {9, 8, 7, 6}, {1, 2, 5, 5} } Output: 31 Only the third and the fourth columns start with an odd element. And, sum = 3 + 7 + 5 + 5 + 6 + 5 = 31 Input: mat[][]