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...

One potential drawback to increasing the number of undos is that your computer might slow down

Indicate whether the statement is true or false

Computer Science & Information Technology

An Excel 97-2003 workbook can be opened with Excel 2013

Indicate whether the statement is true or false.

Computer Science & Information Technology

Compared with traditional methods, the entire rapid application development (RAD) process is expanded and, as a result, the new system is built, delivered, and placed in operation much later.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

You can add a shortcut to a menu by preceding one of the characters in the menu name with a(n) ____.  This places an underline under the next character typed.

A. underscore (_ ) B. hyphen (-) C. ampersand (&) D. asterisk (*)

Computer Science & Information Technology