Whats wrong in this https://ide.codingblocks.com/s/413662

whats wrong in this https://ide.codingblocks.com/s/413662

Hey @hssharma2212000
I can see Aman is already taking this doubt, please dont open multiple copies of same doubt

:upside_down_face:
.
.
.
.
.

i am not satisfied with aman can u help or should i open one more

okay will look into it …

	for(int i=0;i<m;i++)
	{
		if(n!=0&&i>=ansi and i<=ansj) //added n!=0 here
		{
			cout<<1<<" ";
		}
		else
		{
			cout<<arr[i]<<" ";
		}
	}

yes got it
thank you

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.