Compiled then why unable not submitted

Please check this code sir …

#include
using namespace std;

int pascal(int i,int j){
if(j==1 || j==i)
return 1;
else
// return i;
return pascal(i-1,j-1)+pascal(i-1,j);
}

int main()
{
int n;
cin>>n;
int i,j,sp;
for(i=1;i<=n;i++)
{
//print space
for(sp=1;sp<=n-i;sp++)
{
cout<<" “;
}
for(j=1;j<=i;j++)
{
cout<<pascal(i,j);
if(j!=i)
cout<<” ";
}
cout<<endl;
}
return 0;
}

hello @piyushkumar999999
pls share ur code using cb ide

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.