Browse Source

refactoring: added comments in main

remotes/origin/primzahl
Hendrik Sitzmann 11 months ago
parent
commit
a98e9ecc18
  1. 3
      src/primzahl/main.c

3
src/primzahl/main.c

@ -3,10 +3,13 @@
#include <stdio.h>
int main() {
// set the smallest possible input
int minInput = 0;
//get user input
int num = usergetd("Enter a positive number: ", minInput, NULL);
//check if its a prime number or not
if (primzahl(num))
printf("%d is a prime number.\n", num);
else

Loading…
Cancel
Save