The switch statement equivalent to the following if statement is:

```
if (digit == 0)
value = 0; else if (digit == 1) value = 0;
else if (digit == 2)
value = 4;
else
value = 8;

a.switch (digit)
{
case 0:
case 1:
value = 0;
break;
case 2:
value = 4;
break;
default:
value = 8;
}

b. switch (value)
{
case 0:
case 1:
value = 0;
break;
case 2:
value = 4;
break;
default:
value = 8;
}

c. switch (digit)
{
case 0:
case 1:
value = 0;
case 2:
value = 4;
default:
value = 8;
}

d. switch (digit)
{
case 0:
case 1:
value = 0;
break;
case 2:
value = 4;
}

e. switch (digit) case 0: case 1:
{
value = 0;
break;
}
case 2:
{
value = 4;
break;
}
default:
{

} Short Answer

value = 8;
break;
```

```
a.switch (digit)
{
case 0:
case 1:
value = 0;
break;
case 2:
value = 4;
break;
default:
value = 8;
}
```

Computer Science & Information Technology

You might also like to view...

An Access database that is split into two files—one containing the back end and one containing the front end

a. ACCDE b. Split database c. Optimized file

Computer Science & Information Technology

A join line displays in the Relationships window whenever two tables are related based on a common field

Indicate whether the statement is true or false

Computer Science & Information Technology