What is wrong with my code?

i am not getting desired answer. please check my code and tell me where i am wrong. here is my code

I corrected your code, please see https://ide.codingblocks.com/s/293264