Advertisement
fosterbl

TotalRow.java

Jan 22nd, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. //(c) A+ Computer Science
  2. //www.apluscompsci.com
  3. //Name -
  4. import java.util.Arrays;
  5.  
  6. public class TotalRow
  7. {
  8.     public static int[] getRowTotals( int[][] m )
  9.     {
  10.         //add code here
  11.         return null;
  12.     }
  13.      
  14.      public static void main(String[] args){
  15.         int[][] f = {{1,2,3},{5,5,5,5}};
  16.         System.out.println( Arrays.toString( getRowTotals( f ) ) );
  17.        
  18.         f = new int[][]{{1,2,3},{5},{1},{2,2}};
  19.         System.out.println( Arrays.toString( getRowTotals( f ) ) );
  20.        
  21.         f = new int[][]{{1,2},{5,5},{5,5},{4,5,6,7},{123124,12312}};
  22.         System.out.println( Arrays.toString( getRowTotals( f ) ) );
  23.        
  24.      }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement