using interrupts

I posted a program there but its not working at all, so i needed someone to write program as i'm very bad at programming