Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //(c) A+ Computer Science
- //www.apluscompsci.com
- //Name -
- import java.util.*;
- import java.io.*;
- public class MatrixSumming2
- {
- public static int sum( int[][] mat, int r, int c )
- {
- return 0;
- }
- public static void main(String[] args){
- int[][] m = {{1, 2, 3, 4, 5},
- {6, 7, 8, 9, 0},
- {6, 7, 1, 2, 5},
- {6, 7, 8, 9, 0},
- {5, 4, 3, 2, 1}};
- System.out.println( sum(m, 2, 2) );
- System.out.println( sum(m, 0, 0) );
- System.out.println( sum(m, 4, 3) );
- System.out.println( sum(m, 4, 4) );
- System.out.println( sum(m, 2, 4) );
- System.out.println( sum(m, 1, 3) );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement