#include <conio.h>
int isPrime(int number, int i)
{
if(i==1)
{
return 1;
}
else
{
if(number%i==0)
return 0;
else
isPrime(number,i-1);
}
}
int main(){
int number, prime;
printf("Enter a positive number: ");
scanf("%d", &number);
prime = isPrime(number, number/2);
if(prime==1)
printf("%d is a prime number.", number);
else
printf("%d is not a prime number.", number);
getch();
}