Incorrect output

whats wrong in my code?

hello @Rama
pls save ur code here ->https://ide.codingblocks.com/
and share the link with me.

1 Like

@Rama
ur logic is correct.
but u need to read n new input and then u have to apply ur logic on that input .

like this->