[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Celebrate Odd Day today!
>>>>> On Fri, 19 Nov 1999 12:37:58 -0500, "K . William Young" <[email protected]> said:
> On Fri, Nov 19, 1999 at 11:06:13AM -0500, Mike Harrelson wrote:
>> =====================Forwarded Message:
>>
>> The numerical format for Wednesday was 11-17-1999. All of the
>> digits are odd.
>>
>> The last Odd day in our lifetime is today 11-19-1999.
> But!!! 11 and 17 are also prime. I checked bc and got:
> [will@bofh will]$ bc bc 1.05 Copyright 1991, 1992, 1993, 1994,
> 1997, 1998 Free Software Foundation, Inc. This is free software
> with ABSOLUTELY NO WARRANTY. For details type `warranty'. 13 *
> 153 1989 1999 / 13 153
> I _think_ 1999 is prime (because 2000 is smooth). There's a
> special place in hell for whoever figured that no-one uses
> /usr/games/primes and left it out of Mandrake.
>> Hmm. . . maybe I too much free time. ;-)
> Am I thinking so Yes, hmm.
Speaking of free time:
#!/usr/bin/perl
$y = $ARGV[0];
for ($x = 2; $x < $y; $x++) {
$z = $y / $x;
if ($z == int($z)) {
print "$x is a factor of $y\n";
exit (0);
}
}
print "$y is prime\n";
BrYan