logo CodeStepByStep logo

expressions3

Language/Type: PHP expressions mod
Author: Melissa Hovik (on 2018/01/05)

Trace the evaluation of the following expressions, and give their resulting values. Make sure to give a value of the appropriate type (such as including "" quotes around a String or a .0 at the end of a Float).

3 + 2 * 4 + 12 / 6
13 / 2 / 2.0 + 5 / 2.0 / 2
18 % 5 + 2 % 5 + 28 % 11 % 4
6 == 3 * 2 && !(7 < 6) && 1 + 1 != 3
1 + 2 . "!" . 3 + 4
1 + 2 . "\." . 3 + 4
1 + 2 . "." . 3 + 4
2 + 2 + 2 . "2" . 2 + 2 + 2 . "2"

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.