Advertisement
Guest User

Untitled

a guest
Nov 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. class ArraySum{
  2. public static void main ( String[] args ) {
  3. int[][] data = { {3, 2, 5},
  4. {1, 4, 4, 8, 13},
  5. {9, 1, 0, 2},
  6. {0, 2, 6, 3, -1, -8} };
  7. // declare the sum
  8. ???
  9. // compute the sum
  10. for ( int row=0; row < data.length; row++) {
  11. for ( int col=0; col < ???; col++) {
  12. ???
  13. }
  14. }
  15. // write out the sum
  16. c.println( );
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement