https://ide.codingblocks.com/s/461317.
Unable to get the output. Problem lies in the second half of the code.
corrected code: