foo.c: In function 'main':
foo.c:22:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
^~~~~~~~~~~~~~~~~~~
foo.c:24:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
(void)scanf("%d",&v[i]);
^~~~~~~~~~~~~~~~~~~~~~~
foo.c:27:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
(void)scanf("%d",&plus);
^~~~~~~~~~~~~~~~~~~~~~~
foo.c:29:4: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
(void)scanf("%d",&cost[j]);
^~~~~~~~~~~~~~~~~~~~~~~~~~