fork download
  1. #!/usr/bin/perl6
  2. print("The Perl6 Add/Multiply Program.\n");
  3. my $num1 = 25;
  4. my $num2 = 25;
  5. my $num3 = ($num1 + $num2);
  6. print("NUM1 " ~ $num1 ~ " NUM2 " ~ $num2 ~ " NUM3 " ~ $num3 ~ "\n");
  7. my $num4 = 35;
  8. my $num5 = 35;
  9. my $num6 = ($num4 * $num5);
  10. print("NUM4 " ~ $num4 ~ " NUM5 " ~ $num5 ~ " NUM6 " ~ $num6 ~ "\n");
Success #stdin #stdout 0.25s 82808KB
stdin
1
2
10
42
11
stdout
The Perl6 Add/Multiply Program.
NUM1 25 NUM2 25 NUM3 50
NUM4 35 NUM5 35 NUM6 1225