fork download
  1. import std.stdio;
  2.  
  3. void main()
  4. {
  5. uint[] u1 =
  6. [
  7. 0, 1, 2, 3,
  8. 4, 5, 6, 7,
  9. 8, 9,10,11,
  10. 12,13,14,15,
  11.  
  12. 16,17,18,19,
  13. 20,21,22,23,
  14. 24,25,26,27,
  15. 28,29,30,31,
  16. ];
  17.  
  18. for (int y; y < 4; ++y)
  19. {
  20. for (int x; x < 4; ++x)
  21. {
  22. writef("%d ", u1[y * 4 + x]);
  23. }
  24. writeln("");
  25. }
  26. }
  27.  
Success #stdin #stdout 0.01s 2120KB
stdin
Standard input is empty
stdout
0 1 2 3 
4 5 6 7 
8 9 10 11 
12 13 14 15