1. Engineering
  2. Computer Science
  3. question 17 suppose sale is a double variable write a...

Question: question 17 suppose sale is a double variable write a...

Question details

QUESTION 17 Suppose sale is a double variable. Write a boolean expression to check if sale is between $10,000 and $20,000 inclusive. Fill in the expression. QUFSTION 18QUESTION 18 Suppose that overSpeed and fine are double variables. Assign the value to fine as follows: if 0 < overSpeed<-5, the value assigned to fine is $20.00; if 5 < overSpeed <= 10, the value of assigned to fine is $75.00; if 10 < overspeed e 15, the value assigned to fine is $150.00; if overSpeed> 15, the value assigned to fine is $150.00 plus $20.00 per mile over 15. if (0 < overSpeed && overSpeed 5) else if (5s overspeed && overspeed 10) else if (10overSpeed && overSpeed15) else if (overSpeed> 15) Enter the missing expression on the last line. fine = 20.00; fine 75.00; fine 150.00; fine 150.00 + 20.00 * ( ); Il Last lineQUESTION 19 score is an int variable, consider the following if statement: if (score 90); cout << Discount = 10%; What is the output if the value of score is 95? What is the output if the value of score is 85?QUESTION 20 Suppose that score is an int variable. Consider the following if statements: i. if (score 70) cout <<Grade is C.; ii. if (score70) cout << Grade is C.. What is the output in (1) and (i) if the value of score is 70? What is the value of score after the if statement in (i) executes? What is the output in (ii) if the value of score is 80? What is the value of score after the if statement in (i) executes?

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution