Main.cc: In function ‘int main()’:
Main.cc:21:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if(KQ==1)
^
Main.cc:16:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
Main.cc:18:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~