I'm trying out my HW, where I'm asked to practice nested for loops.
Req:
ID: 001 GRP:1 . . ID:020 GRP:20 ID:021 GRP:1 . . ID:120 GRP:20
but I did something wrong.
This is my looping -Please point out what am I doing wrong. TIAfor (my $i = 1; $i < 7; $i++) { for (my $g = 1; $g < 21; $g++) { my $j = $i * $g; my $id = sprintf ("%03d", $j); print "ID: $id\t GRP: $g \n"; } }
In reply to Need help with nested for loops by fidda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |