Array sum problem matching to target

sir why is my program giving run time error if it is compiling it has shown error while my logic matches to that which is already stated

@mansikanoi17
hello Mansi,
please save ur code on https://ide.codingblocks.com/ and share the link

file:///C:/Users/Dell/Downloads/array%20sum.cpp

@mansikanoi17
paste ur code on this link -> https://ide.codingblocks.com/
press save button .
then share the generated link

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.