A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
14
Task/Loops-For/Fantom/loops-for-1.fantom
Normal file
14
Task/Loops-For/Fantom/loops-for-1.fantom
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class ForLoops
|
||||
{
|
||||
public static Void main ()
|
||||
{
|
||||
for (Int i := 1; i <= 5; ++i)
|
||||
{
|
||||
for (Int j := 1; j <= i; ++j)
|
||||
{
|
||||
Env.cur.out.print ("*")
|
||||
}
|
||||
Env.cur.out.printLine ("")
|
||||
}
|
||||
}
|
||||
}
|
||||
14
Task/Loops-For/Fantom/loops-for-2.fantom
Normal file
14
Task/Loops-For/Fantom/loops-for-2.fantom
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class ForLoops
|
||||
{
|
||||
public static Void main ()
|
||||
{
|
||||
(1..5).each |i|
|
||||
{
|
||||
(1..i).each |j|
|
||||
{
|
||||
Env.cur.out.print ("*")
|
||||
}
|
||||
Env.cur.out.printLine ("")
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue