Skip to content

Instantly share code, notes, and snippets.

@mlbright
Created August 15, 2017 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlbright/f369f02d99bcb4ab069d964e51a16c6e to your computer and use it in GitHub Desktop.
Save mlbright/f369f02d99bcb4ab069d964e51a16c6e to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
my $days = 7;
my $nights = $days - 1;
my $bar = 2;
my $maid = 5;
my $alacarte = 5;
my $incidental = 80;
my $rounds = 4;
my $mex = 13.9634;
my $total
= ( $nights * $maid )
+ ( $rounds * $days * $bar )
+ ( $alacarte * 4 )
+ $incidental;
printf "Canadian dollars: %.2f\n", $total;
printf "Mexican pesos: %.2f\n", $total * $mex;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment