Anonymous user
Loops/Continue: Difference between revisions
added perl and python
(added perl and python) |
|||
Line 34:
System.out.print(", ");
}</java>
=={{header|Perl}}==
<perl>foreach (1..10) {
print $_;
if ($_ % 5 == 0) {
print "\n";
next;
}
print ', ';
}</perl>
=={{header|Python}}==
<python>line = ""
for i in xrange(1,11):
line += str(i)
if i % 5 == 0:
print line
line = ""
continue
line += ", "</python>
=={{header|UnixPipes}}==
|