Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Added: Dec 13, 2020 4:10 PM
Views: 2
Tags: twodimarray
  1.   public static int rowSum(int[][] a, int x){
  2.  
  3.         int rowsum = 0;
  4.  
  5.         for(int item: a[x]){
  6.             rowsum += item;
  7.         }
  8.         return rowsum;
  9.     }