**Java**

int i, j, number= 1, rows=4; for(i=1; i <= rows; i++){ for(j=1; j <= i; ++j){ System.out.print(number); ++number; } System.out.print("\n"); }

**C++**

int i, j, number= 1, rows=4; for(i=1; i <= rows; i++){ for(j=1; j <= i; ++j){ cout<<number; ++number; } cout<<endl; }

**Javascript**

var i, j, rows = 4, n = 1; for (i = 1; i <= rows; i++){ let eachLine=""; for (j = 1; j <= i; j++, n++){ eachLine+=n+""; } console.log(eachLine); }