Https://ide.codingblocks.com/s/314388

here is the code to this question. please fix it and help me in understanding it.