For loops number pattern question where am i going wrong?

#include
using namespace std;
int main(){
int i=1;
int j=1;
int n;
cin>>n;
while(i<=n){
while(j<=i){
cout<<j;
j++;
}
i++;
j=1;
cout<<endl;
}

}