From fdc93983b5e1b1dd1e60d35b65fe5ad1a8750ae0 Mon Sep 17 00:00:00 2001 From: Hendrik Sitzmann Date: Thu, 8 Feb 2024 12:09:57 +0100 Subject: [PATCH] refactoring: added comments --- src/primzahl/primzahl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/primzahl/primzahl.c b/src/primzahl/primzahl.c index 1d74d73..a4b805d 100644 --- a/src/primzahl/primzahl.c +++ b/src/primzahl/primzahl.c @@ -2,12 +2,15 @@ #include bool primzahl(int num) { + //for the case zero or one if (num <= 1) return false; + //checking if there are any other divider for (int i = 2; i < num; i++) { if (num % i == 0) return false; } + //if none were found return true return true; } \ No newline at end of file