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