# Your Name # The course and Program Assignment Number # The purpose of the program
# Fred J. Doakes # CIT042A Assignment 1 # Get information from users and assign it to scalars
if ($n == 3) {
if ($n == 3) {
my
$a = 2 + ($b - 3) * 4;
$a = $b++ - ++$c;
(This is a good example of the spacing, but poor example of decent code.
The result of this statement may not be what you think.
Write some code to try and see if you are correct in predicting the final value of $a.)my $count; # Count temperatures: valid $count = $count + 1; # Add 1 to count: NOT valid
next
or last
in loops, unless required in an assignment
(to make sure you know what they are).
if ($x > $y){ $isGreater = 1;} else {$isGreater = 0;}
$is_greater = $x > $y;