treasure.cpp: In function 'void findTreasure(int)':
treasure.cpp:9:2: error: 'scanf' was not declared in this scope
9 | scanf("%d", &n);
| ^~~~~
treasure.cpp:22:42: error: too many arguments to function 'void findTreasure(int)'
22 | aa[i][j] = findTreasure(i1, j1, i2, j2);
| ^
treasure.cpp:5:6: note: declared here
5 | void findTreasure(int n) {
| ^~~~~~~~~~~~
treasure.cpp:22:27: error: void value not ignored as it ought to be
22 | aa[i][j] = findTreasure(i1, j1, i2, j2);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~