3 # Check if a number is prime (brute force)
5 # Luiz Fernando N. Capitulino
6 # <lcapitulino@gmail.com>
8 function is_prime(num) {
14 for (var i = 2; i < max; i++) {
23 if (sizeof(args) != 1) {
24 throw "usage: prime.aikido < number >"
27 var num = cast<int>(args[0])
29 System.println("is prime")
32 System.println("is not prime")