Problem set
- Rewrite the following if statement as an equivalent switchstatement. The variable digit is of type int.
if (digit == 0)
value = 3;
else if (digit == 1)
value = 3;
else if (digit == 2)
value = 6;
else if (digit == 3)
   value = 9;
- The decision table below shows fines imposed for speedingviolations. Write a code segment that assigns the correct fine totype double variable fine based on the value of type int variablespeed.
   Speed (mph) Fine ($)
   65 or less  0
   66-70       15.00
   71-75       30.00
   76-80       75.00
   over 80 100.00
- Rewrite the switch statement below as a multiple-alternative ifstatement.
   switch (jersey) {
   case 11:
        printf(\"I.Thomas\n\");
        break;
   case 23:
        printf(\"M.Jordan\n\");
        break;
   case 33:
        printf(\"S.Pippen\n\");
        break;
   default:
        printf(\"Playerunknown\n\");
   }
- What is the output of the following program?
        count = 5;
        while (count> 0) {
         print(“Woot! â€);
         count -=1;
        }