Please help with my code

it is the pattern and numbers problem
here is my code:
#include
#include<math.h>
using namespace std;
int main() {
int n;
cin>>n;

for(int i=1;i<=5;i++)
{
	int k=1;
	for(int j=i;j<=5;j++){
		cout<<k++<<" ";
	}

	int lk=0;

    while(lk != 2 * i-1)
    {
       cout<<"* ";
        ++lk;
    }

	cout<<endl;
}

}

Hello @shreyanarula3,

First of all you should practice these questions in python, secondly, here this code will help you to write your own in python for this question. This particular code prints a pattern like given below for n = 5:

*    
**   
***  
**** 
*****

You can take this as reference for your problem.

Happy Learning :slightly_smiling_face: