Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Stupidest Prime Number detector ever!!

by Anonymous Monk
on Jun 23, 2021 at 18:43 UTC ( [id://11134208]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my $elapsed_time = tv_interval($start_time);
    say "$prime_candidate is a prime " if  $is_prime != 0;
    printf "The [$0] script took %2.2f seconds to finish\n", $elapsed_time
    +;
    
  2. or download this
    $ perl time_is_prime_v1.pl 
    Enter the integer: 99929
    ...
    $ perl time_is_prime_v1.pl 
    Enter the integer: 1320486952377516576  
    1320486952377516576 is not a prime
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11134208]
Approved by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-03-28 09:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found