The decision table below shows fines imposed for speeding violations. Write a code segment that assigns the correct fine to type double variable fine based on the value of type int variable speed.

Speed (mph) Fine ($)
65 or less 0
66-70 15.00
71-75 30.00
76-80 75.00
over 80 100.00


```
if (speed <= 65)
fine = 0;
else if (speed <= 70)
fine = 15.0;
else if (speed <= 75)
fine = 30.0;
else if (speed <= 80)
fine = 75.0;
else
fine = 100.0
```

Computer Science & Information Technology

You might also like to view...

What will the following statement output?

``` cout << &num1; ``` a. the value stored in the variable named num1 b. the memory address of the variable named num1 c. the number 1 d. the string &num1 e. None of these

Computer Science & Information Technology

Which of the following statements are true?

a. TextField inherits from TextInputControl. b. TextField inherits from ButtonBase. c. TextField inherits from Labelled. d. TextField inherits from Control. e. TextField inherits from Node.

Computer Science & Information Technology

Flash Fill is a function in Microsoft Excel used to enter formulas with multiple calculations.?

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

Computer Science & Information Technology

View your ____________________ as a temporary location only; after reading an e-mail message, immediately delete it, flag it, or file it in an e-mail folder.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology