A good deal of traditional programming languages have 4 sections called, initialization, condition, increment/decrement and body. In this post, I’m sharing with you on how we can depict this flow in a flowchart. Hope it helps, let me know in comments if you are looking for something else.
A typical nested for loop to traverse a matrix in traditional programming languages such as C, C++ or Java looks as below:
for(i = 0; i < 3; i++) {
for(j = 0; j < 3; j++) {
System.out.println(matrix[i][j]);
}
}
Let us depict this code in a flowchart.