Main.cc:3:7: error: 'n' was not declared in this scope
int a[n];
^
Main.cc: In function 'int main()':
Main.cc:8:11: error: 'a' was not declared in this scope
cin >> a[i];
^
Main.cc:15:9: error: 'a' was not declared in this scope
if (a[sum] > a[i]) {
^
Main.cc:19:7: error: 'a' was not declared in this scope
t = a[j];
^