wrong answer in mixture

getting wa in mixture.
here is my code- http://ideone.com/I4wJhi
I am doing recursively.
plese check my code.

//