Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Added: Dec 13, 2020 4:25 PM
Views: 2
Tags: twodimarray
  1. public static int columnSum(int[][] a, int x){
  2.         int columnTotal = 0;
  3.         for (int i = 0; i < a.length; i++) {
  4.             columnTotal += a[i][x];
  5.         }
  6.         return columnTotal;
  7.     }