foo.cc: In function 'int main()':
foo.cc:81:18: error: 'cal1' was not declared in this scope
printf("%d",(cal1()-cal2())&P);
^~~~
foo.cc:81:18: note: suggested alternative: 'scalb'
printf("%d",(cal1()-cal2())&P);
^~~~
scalb
foo.cc:81:25: error: 'cal2' was not declared in this scope
printf("%d",(cal1()-cal2())&P);
^~~~
foo.cc:81:25: note: suggested alternative: 'scalb'
printf("%d",(cal1()-cal2())&P);
^~~~
scalb
foo.cc:78:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:79:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1;i<=n;i++) scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~