From 0c9d284fc777cb3797314555cb9eb4f0cf2fca4e Mon Sep 17 00:00:00 2001 From: Hendrik Sitzmann Date: Thu, 8 Feb 2024 18:38:12 +0100 Subject: [PATCH] added function --- src/primzahl/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/primzahl/main.c b/src/primzahl/main.c index 555fd74..8bf3839 100644 --- a/src/primzahl/main.c +++ b/src/primzahl/main.c @@ -8,5 +8,10 @@ int main() { int num = usergetd("Enter a positive number: ", minInput, NULL); + if (primzahl(num)) + printf("%d is a prime number.\n", num); + else + printf("%d is not a prime number.\n", num); + return 0; } \ No newline at end of file