aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Jacoby <jacoby.david@gmail.com>2023-11-13 18:01:16 -0500
committerDave Jacoby <jacoby.david@gmail.com>2023-11-13 18:01:16 -0500
commitc9f16344d241fab019b01c625d87ac5dfb8f103e (patch)
tree03b0c0cb3f0eeb8013a1654d67c5a37a8c8da883
parent954e9d448df8ddce449e93e86b59d52821c9a171 (diff)
downloadperlweeklychallenge-club-c9f16344d241fab019b01c625d87ac5dfb8f103e.tar.gz
perlweeklychallenge-club-c9f16344d241fab019b01c625d87ac5dfb8f103e.tar.bz2
perlweeklychallenge-club-c9f16344d241fab019b01c625d87ac5dfb8f103e.zip
DAJ 243 reformat
-rw-r--r--challenge-243/dave-jacoby/perl/ch-2.pl14
1 files changed, 13 insertions, 1 deletions
diff --git a/challenge-243/dave-jacoby/perl/ch-2.pl b/challenge-243/dave-jacoby/perl/ch-2.pl
index 75e04ed38e..764d223f86 100644
--- a/challenge-243/dave-jacoby/perl/ch-2.pl
+++ b/challenge-243/dave-jacoby/perl/ch-2.pl
@@ -19,4 +19,16 @@ for my $e (@examples) {
Output: $output
END
}
-sub floor_sum (@input) { my $output = 0; for my $i ( 0 .. -1 + scalar @input ) { my $ii = $input[$i]; for my $j ( 0 .. -1 + scalar @input ) { my $jj = $input[$j]; my $floor = int( $ii / $jj ); $output += $floor; } } return $output;} \ No newline at end of file
+
+sub floor_sum (@input) {
+ my $output = 0;
+ for my $i ( 0 .. -1 + scalar @input ) {
+ my $ii = $input[$i];
+ for my $j ( 0 .. -1 + scalar @input ) {
+ my $jj = $input[$j];
+ my $floor = int( $ii / $jj );
+ $output += $floor;
+ }
+ }
+ return $output;
+}