Main.cc: In function ‘int main()’:
Main.cc:18:2: error: expected initializer before ‘gets’
gets(s);
^~~~
Main.cc:22:6: error: ‘s’ was not declared in this scope
if(s[i]=='a')
^
Main.cc:16:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d\n",&n);
~~~~~^~~~~~~~~~~