From d323639a182caea15decd10f4950367d67cc2656 Mon Sep 17 00:00:00 2001 From: kirbylife Date: Sat, 28 Oct 2023 00:18:41 -0600 Subject: [PATCH] Initial commit --- basic_sum/sum.pl | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 basic_sum/sum.pl diff --git a/basic_sum/sum.pl b/basic_sum/sum.pl new file mode 100644 index 0000000..63c5e68 --- /dev/null +++ b/basic_sum/sum.pl @@ -0,0 +1,5 @@ +% Define the rule to sum 2 numbers +sum(X, Y, Z) :- Z is X + Y. + +% Define the rule to know if a number is even. +is_even(X) :- 0 is X mod 2. \ No newline at end of file