I have written this code but there is an problem how to think for 0

#include
using namespace std;

int main()
{
int n=1;

for(int i=1; i<=5; i++)
{
    for(int j=1; j<=i; j++)
    {
        std::cout << n<<"\t";
        
    }
    n++;
    cout<<endl;
}

}

this is how you have to do it

Modified code

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.