sortbooks.cpp:18:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main()
^
sortbooks.cpp: In function 'int main()':
sortbooks.cpp:21:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~
sortbooks.cpp:23:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~
sortbooks.cpp:27:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &l, &r, &mood);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~