Segmentation fault

i am getting segmentation fault after compiling my code for rain water harvesting.

@aditikandhway
Here is the code for the problem, you can refer this if needed.