What is wrong in this?

My code for this problem is : https://ide.codingblocks.com/s/157351