Median in a stream of running int

code : https://ide.codingblocks.com/s/276454

what is wrong here?

Hey Chaman!, you were messing a bit with input, I’ve rectified it

Thanks a lot… this worked

what was my mistake?

You were taking extra input causing problem!

Thank you mayank, it is cleared now