#include <stdio.h>
#include <stdlib.h>

int main(void)
{
  int num, divisor, is_prime;

  printf("Enter a number: ");
  scanf("%d", &num);

  
  is_prime = 1;
  divisor=2;                        
  while(divisor <= num/2){          //for(divisor=2; divisor <= num/2; divisor++)  {
    
	if((num%divisor)==0)   {       //if(!(num%divisor))   {
         is_prime = 0;  
		 break;
	}
    divisor++;
  }
  if(is_prime)            // if(is_prime==1) 
      printf("is prime.");
  else 
      printf("not prime.");
  printf("\n");
  
  system("pause");
  
  return 0;
}

