Hi,
You can do this by creating an on demand workflow.
Assuming you have the security permissions to create one.
Create an on demand workflow for entity Case.
The workflow will be to change the status of the case to resolved and add the status reason also.
Activate the workflow.
Now go to the active cases view and select all the cases you want to resolve and run the workflow.
No code needed.
Hope this helps.