knapsack.cpp: In function 'int main()':
knapsack.cpp:23:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
23 | scanf("%d",&s);
| ~~~~~^~~~~~~~~
knapsack.cpp:24:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
24 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
knapsack.cpp:27:16: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
27 | scanf("%d",(v+i));
| ~~~~~^~~~~~~~~~~~
knapsack.cpp:28:16: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
28 | scanf("%d",(w+i));
| ~~~~~^~~~~~~~~~~~
knapsack.cpp:29:16: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
29 | scanf("%d",(k+i));
| ~~~~~^~~~~~~~~~~~