liz.cpp: In function 'int main()':
liz.cpp:32:12: error: 'i' was not declared in this scope
if(i != 0)
^
liz.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &num, &query);
~~~~~^~~~~~~~~~~~~~~~~~~~~~
liz.cpp:14:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", data);
~~~~~^~~~~~~~~~~~
liz.cpp:35:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &range);
~~~~~^~~~~~~~~~~~~~