array_init.cvc 510 B

123456789101112131415161718192021222324252627282930313233
  1. extern void printInt(int i);
  2. extern void printNewlines(int i);
  3. int[i, j] glob;
  4. export int main() {
  5. int[2,3] a = [[1,2,3], [4,5,6]];
  6. int[2,3] b = 7;
  7. for(int i=0,2) {
  8. for(int j=0,3) {
  9. printInt(a[i,j]);
  10. printNewlines(1);
  11. }
  12. }
  13. printNewlines(1);
  14. for(int i=0,2) {
  15. for(int j=0,3) {
  16. printInt(b[i,j]);
  17. printNewlines(1);
  18. }
  19. }
  20. return 0;
  21. }
  22. void foo() {
  23. void bar() {
  24. int[4, 5] arr = 1;
  25. }
  26. }