buzzer sound for 10sec when the state of a input pin changes

Hello,
Thank you very much for your valuable suggestions. I am a beginner. i will change my code according to your comments and will check.