What is the result of executing this program code?

Consider the following program code:
$x = 10;
LOOP: while ($x < 15)
{
print ($x );
if ($x >= 14 && $x <= 20)
{
$x += 2;
redo LOOP;
}
else
{
$x++;
}
What is the result of executing this program code?

Consider the following program code:
$x = 10;
LOOP: while ($x < 15)
{
print ($x );
if ($x >= 14 && $x <= 20)
{
$x += 2;
redo LOOP;
}
else
{
$x++;
}
What is the result of executing this program code?

A.
The code will output the following:
11 12 13 14 15 16 17 18 19

B.
The code will output the following:
10 11 12 13 14 16 18 20 22

C.
The code will output the following:
10 11 12 13 14 16 18 20

D.
The code will output the following:
10 11 12 13 14 15 16 17 18 19 20



Leave a Reply 0

Your email address will not be published. Required fields are marked *