📘 Multiplying big numbers using Perl 6

Create a program to multiply very big integer numbers.

In Perl 6, the support for big numbers is built-in: the Intclass allows arbitrary precision. You do not have to do any extra work. You just take the numbers and multiply them, as shown in the example (numbers should be written on one line, and without spaces, of course):

my $a =

my $b =

say $a * $b;

Run the program and check the result 🙂

$ perl6 multiply.pl 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s