Main.cc: In function ‘int main()’: Main.cc:11:6: error: ‘i’ was not declared in this scope for(i=0;i<=n;i++) ^ Main.cc:15:16: error: ‘x’ was not declared in this scope printf("%d",x[i]); ^ Main.cc:6:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ~~~~~^~~~~~~~~ Main.cc:9:8: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&a[i]); ~~~~~^~~~~~~~~~~~