Showing incomparable types error

https://ide.codingblocks.com/s/151315 The code is showing object cannot be converted to int error in stack

Hi @tanjuljain19 ,
https://ide.codingblocks.com/s/151475 i have commented the error in line 19 and corrected the code.