Perl Operators   «Prev  Next»

Evaluate Perl expressions - Exercise

Evaluate expressions


Objective:Evaluate several expressions that use mathematical operators.

Instructions

Read the following expressions and decide what their results are, without running them. Then, put them in your test.pl program (the one you created for your testbed in the first module) and see if you were right.
  1. 5 * 3**4
  2. 5 % 7
  3. 7 % 5
  4. 1 + 2 * 3 / 4
Enter your answers in the text area below and then click the Submit button.