Question about Nested Loops
Posted: Fri Dec 29, 2023 1:32 pm
Hi, I am currently looking through nested loops and I am running into a question that I was hoping to get rectified.
On page 166 of the book you are going through 14 steps outlining how to tackle the nested loop example on the previous page. In these steps, in order to find the value of the sum variable, for example, you say " sum is assigned 5 + values[3][0]" and you then mention this evaluates to 5+4.
The doubt that I am running into is that I don't really understand how you are evaluating the "values[3][0]" part to 4. Can you please help me with this, and just help me understand how this works? Thanks
On page 166 of the book you are going through 14 steps outlining how to tackle the nested loop example on the previous page. In these steps, in order to find the value of the sum variable, for example, you say " sum is assigned 5 + values[3][0]" and you then mention this evaluates to 5+4.
The doubt that I am running into is that I don't really understand how you are evaluating the "values[3][0]" part to 4. Can you please help me with this, and just help me understand how this works? Thanks