money.cpp:7:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main(){
^
money.cpp: In function 'int main()':
money.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld",&n);
~~~~~^~~~~~~~~~~
money.cpp:10: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("%lld",&a[i]);
~~~~~^~~~~~~~~~~~~~