Fibonacci pattern

#include
using namespace std;

int main()
{
int n;
cin>>n;

signed int a=0,b=1,c=1;

cout<<a<<endl;
if(n>0)
{
cout<<b<<" "<<c<<endl;

    for(int i=3;i<=n;++i)
    {
        for(int j=1;j<=i;++j)
        {
        a=b;
        b=c;
        c=a+b;
        cout<<c<<" ";
        }
    cout<<endl;
    }
}

return 0;

}

@sudhanshu8917 Please save your code on ide.codingblocks.com and share its link. And also please mention your problem.

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.