world.main ( )
rowLim = 3 , colLim = 5 , rowData = , product = 0 |
|
// Copyright 2007, R.G.Baldwin |
// Illustrates nested for loops. |
Loop rowLim times times |
|
Loop colLim times times |
|
// Compute product of row and column. |
product set value to ( ( index * index ) ) |
// Append product onto print line. |
rowData set value to ( rowData joined with ( product as a string ) ) |
// Append column separator (space character) to print line. |
rowData set value to ( rowData joined with ) |
// Perform another test in the inner loop. |
// Display the row data. |
print rowData |
// Clear the row data. |
rowData set value to |
// Perform another test in the outer loop. |