money.cpp:5:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main(){
^
money.cpp: In function 'int main()':
money.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
money.cpp:8:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(i=0;i<n;i++)scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~