Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Logical-operations/Vala/logical-operations.vala
Normal file
14
Task/Logical-operations/Vala/logical-operations.vala
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
public class Program {
|
||||
private static void print_logic (bool a, bool b) {
|
||||
print ("a and b is %s\n", (a && b).to_string ());
|
||||
print ("a or b is %s\n", (a || b).to_string ());
|
||||
print ("not a %s\n", (!a).to_string ());
|
||||
}
|
||||
public static int main (string[] args) {
|
||||
if (args.length < 3) error ("Provide 2 arguments!");
|
||||
bool a = bool.parse (args[1]);
|
||||
bool b = bool.parse (args[2]);
|
||||
print_logic (a, b);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue