CSci 115: Computing and the Internet
Home Syllabus Assignments Tests

Quiz 2

[1] [2] [3]

Problem Q2.1.

[8 pts] What will appear in the browser window as a result of accessing the following PHP file?

<html>
<head><title>Mystery</title></head>
<body>
<?php
    $n = 16;
    for($i = 1; $i < $n; $i++) {
        echo "<p>$n</p>";
        $n = $n / 2;
    }
?>
</body>
</html>

16

8

4