All pastes #772612 Raw Edit

Stuff

public text v1 · immutable
·published 2007-11-13 22:46 UTC
rendered paste body
//sunarthsh isprime(num)---> vriskei an enas arithmos einai prwtos

#include <stdio.h>
#include <time.h>

main()
{
  int num;
  int i=2;
  int done=1;
  
  
  printf("Gimme the number you want to test: \n");
  scanf("%d",&num);
  
  while (done==1 && i<num) 
  {
     if (num % i==0)
     {
       done=0;
     }

     i++;
  }
  if (done==1)
     printf("%d is prime\n",num);
  else
    printf("it is not prime\n");

printf("%ld\n",clock());
}