What is wrong with this code

https://ide.codingblocks.com/s/679386
it is printing one extra bracket in case of ‘( )( )’
the output is coming ‘( ( ) ( )’

hi @2020uec2022,