Pattern program staircase coderinme

How to make pattern

this is a easy pattern like pattern program staircase using number
if we will enter
1
then result will be
1
if we will input 2
output will be
1
12
same 5
1
12
123
1234
12345

#include <iostream>
using namespace std;
int main()
{
	int i,j,n;
	cin>>n;
	for(i=1; i<=n; i++){
		for(j=1;j<=i;j++)
        cout<<j;
		cout<<"\n";		
	}	


}

if you want to learn more pattern click here

Leave a reply:

Your email address will not be published.