fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. const unsigned MAX=3;
  6.  
  7. void fun3(short Tb[][MAX])
  8. {
  9. for(unsigned y=0;y<MAX;++y,cout<<endl) for(unsigned x=0;x<MAX;++x) cout<<Tb[y][x]<<' ';
  10. }
  11.  
  12. void fun2(short (*Tb)[MAX][MAX])
  13. {
  14. fun3(*Tb);
  15. }
  16.  
  17. void fun1(short (&Tb)[MAX][MAX])
  18. {
  19. fun2(&Tb);
  20. }
  21.  
  22. int main()
  23. {
  24. short Tb[MAX][MAX]={{1,2,3},{4,5,6},{7,8,9}};
  25. fun1(Tb);
  26. return 0;
  27. }
Success #stdin #stdout 0s 2728KB
stdin
0 dod pd nrwd
stdout
1 2 3 
4 5 6 
7 8 9