/* Sieve of Eratosthenes *//* See BYTE , January 1983, for comparision with other computers *//* Takes about 5 minutes to run, with the screen off */#define TRUE 1#define FALSE 0#define SIZE 8190char flags[SIZE+1];main() $(  int i,prime,k,count,iter;  printf("10 iterations\n");  fast();  dpoke(19,0);  for(iter=1;iter <= 10;++iter) $(    count=0;    for(i=0;i <= SIZE;++i) flags[i]=TRUE;    for(i=0;i <= SIZE;++i) $(      if(flags[i]) $(        prime=i+i+3;        for(k=i+prime;k<=SIZE;k += prime) flags[k]=FALSE;        ++count;      $)    $)  $)  k=gtime()/60;  slow();  printf("%d primes (1899)\n",count);  printf("%d seconds\n",k);$)