Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Logical-operations/Fantom/logical-operations.fantom
Normal file
21
Task/Logical-operations/Fantom/logical-operations.fantom
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
class Main
|
||||
{
|
||||
static Void doOps (Bool arg1, Bool arg2)
|
||||
{
|
||||
echo ("$arg1 and $arg2 = ${arg1.and(arg2)}")
|
||||
echo ("$arg1 or $arg2 = ${arg1.or(arg2)}")
|
||||
echo ("not $arg1 = ${arg1.not}")
|
||||
echo ("$arg1 xor $arg2 = ${arg1.xor(arg2)}")
|
||||
}
|
||||
|
||||
public static Void main ()
|
||||
{
|
||||
[true,false].each |Bool arg1|
|
||||
{
|
||||
[true,false].each |Bool arg2|
|
||||
{
|
||||
doOps (arg1, arg2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue