tower.cpp: In function 'int main()':
tower.cpp:35:10: error: 'a' was not declared in this scope
35 | while (a[j] < a[i] - d)
| ^
tower.cpp:30:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | scanf("%d%d", &n, &d);
| ~~~~~^~~~~~~~~~~~~~~~
tower.cpp:32:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
32 | scanf("%d", &aa[i]);
| ~~~~~^~~~~~~~~~~~~~