aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-332/hvukman/lua/332_p2.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/challenge-332/hvukman/lua/332_p2.lua b/challenge-332/hvukman/lua/332_p2.lua
new file mode 100644
index 0000000000..1109670252
--- /dev/null
+++ b/challenge-332/hvukman/lua/332_p2.lua
@@ -0,0 +1,28 @@
+
+
+function Oddletters(inp)
+ local odd = true
+ for c in inp:gmatch"." do
+ -- print(c)
+ local i = 0
+
+ for _ in string.gmatch(inp,c) do
+ i = i+1
+ end
+
+
+ if i%2==0 then
+ print("false")
+ odd =false
+ end
+ if i%2 == 0 then break end
+
+ end
+ if odd==true then
+ print("true")
+ end
+end
+
+Oddletters("weelky")
+Oddletters("perl")
+Oddletters("challenge")