/* Find all the primes in the integers 3 thru m.
        From Hancock and Krieger Page 84. 10m40s on 30-286. */
#include <time.h>
main()
{
        struct tm *local;
        time_t seconds;
        int i;
        int n = 1;
        int m = 32767;

        time(&seconds);
        local = localtime(&seconds);
        printf ("\nStart %s", asctime(local));

        while (++n < m)
                {
                i = 1;
                while (++i < n)
                        if (n % i == 0)
                                break;
                        if (i == n)
                                printf ("%d\t", n);
                }
        time(&seconds);
        local = localtime(&seconds);
        printf ("\nEnd   %s", asctime(local));
        return(0);

}

