+ 2

Can anyone plz explain me how the computer actually evaluates this result?

https://code.sololearn.com/W0QeMhs5N2vZ/?ref=app I want to know exactly how the computer processes the output step by step...How the loop works here and what loop within a loop does??

22nd Feb 2018, 2:51 PM
PiXeL99
PiXeL99 - avatar
1 Odpowiedź
+ 1
First it prompts you for the number of rows and stores that value inside of x, which we'll use to regulate how many times the outer loop iterates. The inner loop is what's being used to display the numbers in the row, and it's basing it upon the outer loop counter, which is regulating how many rows. So outer loop is regulating how many rows, and inner loop is regulating the content of each row. The <br> at the end of the outer loop is breaking the current row to get ready for the new row.
22nd Feb 2018, 2:57 PM
Fata1 Err0r
Fata1 Err0r - avatar