title: Primality test using Fermat little theorem
body: <p>code: </p>
  
  <pre><code>void prime()    
  {    
      int i,N;    
      scanf("%d",&amp;N);    
      for(i=2;i&lt;N;i++)            
      {    
          if (((i^(N-1))%N )==1);     
          else{    
              printf("not prime");   
              return;
          }     
      }    
      printf("prime");    
      return;    
  }    
  </code></pre>
  
  <p>This program is based on Fermat's Theorem on prime numbers. N is number to be tested as prime. This program is not showing correct result for '11'. Maybe due to some mistake which is not identified by me.</p>