fork download
  1. class Matrix {
  2. public static void main(String args[]) {
  3. double m[][] = {
  4. { 0*0, 1*0, 2*0, 3*0 },
  5. { 0*1, 1*1, 2*1, 3*1 },
  6. { 0*2, 1*2, 2*2, 3*2 },
  7. { 0*3, 1*3, 2*3, 3*3 }
  8. };
  9. int i, j;
  10. for(i=0; i<4; i++) {
  11. for(j=0; j<4; j++)
  12. System.out.print(m[i][j] + " ");
  13. System.out.println();
  14. }
  15. }
  16. }
Success #stdin #stdout 0.12s 57768KB
stdin
Standard input is empty
stdout
0.0 0.0 0.0 0.0 
0.0 1.0 2.0 3.0 
0.0 2.0 4.0 6.0 
0.0 3.0 6.0 9.0