Jump to content

nertho

Member
  • Posts

    2
  • Joined

  • Last visited

Awards

This user doesn't have any awards

nertho's Achievements

  1. nertho

    Perl Help

    Hey guys, I'm taking my first programming course and I'm having a little trouble with an assignment. This is the assignment: This program asks you to prompt the user to enter three numbers, read those three numbers from the user, and then output the following math results. Assuming that the numbers were entered into variables $a, $b and $c in that order, output the following values: - the sum of all three numbers ($a + $b + c$) - the product of all three numbers ($a * $b *$c) - the division of the first and third numbers ($a / $c) - the remainder division of the first and second numbers ($a % $b) - the difference of the first and second numbers ( $a - $b) - using selection, determine the largest number of $a and $b - using selection, determine the smallest number of $b and $c Note: Do not manipulate (i.e., change from positive to negative) the numbers in any way; use them as entered by the user. Use the following format for your output, where ## would be the appropriate value. Make sure to use the correct text in your output, followed immediately by a colon, followed immediately by the answer. There should be no spaces in the output. Place each answer on a separate line. The output must be in this order to receive full credit. SUM:## MUL:## DIV:## MOD:## DIF:## LRG:## SML:## This is what I've got so far: #!/usr/bin/perl use Modern::Perl; print 'Enter your first number: '; my $firstnumber = <>; #chomp $firstnumber; print 'Enter a second Number: '; my $secondnumber = <>; #chomp $secondnumber; print 'Enter a third number: '; my $thirdnumber = <>; #chomp $thirdnumber; say $firstnumber + $secondnumber + $thirdnumber; say $firstnumber * $secondnumber * $thirdnumber; say $firstnumber / $thirdnumber; say $firstnumber % $secondnumber; say $firstnumber - $secondnumber; if ($firstnumber < $secondnumber) { print "I don't know how to do this\n"; } Can anyone help?
  2. How about some TV tuner solutions? Like these: https://www.newegg.com/Product/Product.aspx?Item=N82E16815116072 https://www.newegg.com/Product/Product.aspx?Item=9SIA8H554E1230
  3. nertho

    Blizzcon 2017

    Is anyone going to this years Blizzcon by chance?
×