what should i do to get this pattern
i wrote this code to give this o/p
[8:41 PM, 9/14/2019] : #include
using namespace std;
int main() {
int n,i=1,val=1;
cin>>n;
while(i<=n){
int j=1;
while(j<=i){
cout<<val;
j=j+1;
}
cout<<endl;
i=i+1;
}
return 0;
}
[8:41 PM, 9/14/2019] : 1
11
111
1111
11111
111111
help me to get the o/p as
1
11
111
1001
11111
100001