Skip to content

Instantly share code, notes, and snippets.

@peter279k
Created May 24, 2017 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peter279k/5294689ef23d4e205fbb827c3dcbc9d9 to your computer and use it in GitHub Desktop.
Save peter279k/5294689ef23d4e205fbb827c3dcbc9d9 to your computer and use it in GitHub Desktop.
TQC+ JAVA
public class JPA05 {
public static void main(String[] argv) {
int sum = 0;
int A[][][] = {{{1,2,3},{4,5,6}},
{{7,8,9},{10,11,12}},
{{13,14,15},{16,17,18}},
{{19,20,21},{22,23,24}}};
for(int i=0;i<4;i++) {
for(int j=0;j<2;j++) {
for(int k=0;k<3;k++) {
sum += A[i][j][k];
}
}
}
System.out.printf("sum = %d\n", sum);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment