answer.code:15:1: error: ISO C++ forbids declaration of ‘pok’ with no type [-fpermissive]
15 | pok(){
| ^~~
answer.code: In function ‘int pok()’:
answer.code:17:15: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
17 | if(x[0]<0)return;
| ^~~~~~
answer.code:19:15: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
19 | if(x[1]<0)return;
| ^~~~~~
answer.code:21:15: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
21 | if(x[2]<0)return;
| ^~~~~~
answer.code:23:15: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
23 | if(x[3]<0)return;
| ^~~~~~
answer.code:24:25: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
24 | if(x[0]==0&&x[2]==0)return;
| ^~~~~~
answer.code:25:23: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
25 | if(x[1]+x[4]>n[0])return;
| ^~~~~~
answer.code:26:23: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
26 | if(x[3]+x[5]>n[1])return;
| ^~~~~~
answer.code: In function ‘void test()’:
answer.code:43:41: error: ‘mx’ was not declared in this scope; did you mean ‘mx5’?
43 | for(x[4]=mx4;x[4]>=0&&mx4-x[4]<=100;mx[4]--){
| ^~
| mx5
answer.code: In function ‘int pok()’:
answer.code:27:8: warning: control reaches end of non-void function [-Wreturn-type]
27 | ans=max(ans,x[1]*k[1]+x[3]*k[3]-x[0]-x[2]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code: In function ‘void test()’:
answer.code:31:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
31 | scanf("%i",&n[i]);
| ~~~~~^~~~~~~~~~~~
answer.code:34:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
34 | scanf("%i",&k[i]);
| ~~~~~^~~~~~~~~~~~
answer.code: In function ‘int main()’:
answer.code:53:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
53 | scanf("%i",&t);
| ~~~~~^~~~~~~~~