Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Cheat attractive
#perl 5.22.1 use feature 'say'; my @samplePrimes= (2,3,5,7); my %attractive=(); foreach my $p1 (@samplePrimes){ foreach my $p2 (@samplePrimes){ $attractive{$p1*$p2}=1; foreach my $p3(@samplePrimes){ $attractive{$p1*$p2*$p3}=1; } } } say foreach (sort {$a <=> $b} keys %attractive)
run
|
edit
|
history
|
help
0
key_hash_function
Hello
Simple Perl Interview Question
1st code
Attractive numbers
Hash
Quote code
Array_range_operators
Perl
PRAC 2 #5