Pascal triangle 1 doubt

I am not getting any test case pass for this code, but it is giving correct output.why?

Hey @ayushtiwari12
Logic seems correct
spaces ka issue h
Use this to correct urs

for(int i=0;i<n;i++)
	{
		for(int j=0;j<(n-i);j++)
		{
			cout<<" ";// use single space
		}
		for(int j=0;j<=i;j++)
		{
			cout<<ncr(i,j)<<" ";//use single space
		}
		
		cout<<endl;
	}

I can’t able to understand, can you please make corrections in my code?

Hey @ayushtiwari12
Mentioned the changes in comments
There was spacing issue in start of row, u were missing 1 space in starting

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.