#!/usr/bin/perl use Modern::Perl; print "How many times to play Mega Millions?"; my $mm = <>; my $count = 0; my $num1; my $num2; my $num3; my $num4; my $num5; my $bb; say "Mega Millions Numbers: "; while ($count < $mm) { $num1 = int(rand(55)); $num1++; $num2 = int(rand(55)); $num2++; $num3 = int(rand(55)); $num3++; $num4 = int(rand(55)); $num4++; $num5 = int(rand(55)); $num5++; $bb = int(rand(45)); $bb++; print ("$num1 $num2 $num3 $num4 $num5 :: $bb\n\n"); $count++; } $count = 0; print "How many times to play Powerball?"; $mm = <>; say "Powerball Numbers: "; while ($count < $mm) { $num1 = int(rand(58)); $num1++; $num2 = int(rand(58)); $num2++; $num3 = int(rand(58)); $num3++; $num4 = int(rand(58)); $num4++; $num5 = int(rand(58)); $num5++; $bb = int(rand(34)); $bb++; print ("$num1 $num2 $num3 $num4 $num5 :: $bb\n\n"); $count++; }