COSC QUIZ 3 EXAM | COMPLETE QUESTIONS WITH 100% RATED
EXPERT SOLUTIONS |2026 LATEST UPDATED
A company issues $5,000.00 bonuses at the end of the year to all employees who earn less than
$100,000. Salary and bonus are both defined as double data types. Which of the following
selection statements would assign the correct amount to bonus?
if (salary bonus == $5000;
if (salary bonus = 5000; --- Correct
if (salary bonus = 5000;
if (salary bonus = $5000; - (answer)if (salary bonus = 5000;
if (a > 10)
if (b > 10)
if (c > 10)
result = 1;
else
, if (b > 100)
result = 2;
else
result = 3;
else
result = 4;
else
result = 5;
Using the above code segment, what is stored in result when a, b and c are equal to 200?
1 --- Correct
2
3
4 - (answer)1
EXPERT SOLUTIONS |2026 LATEST UPDATED
A company issues $5,000.00 bonuses at the end of the year to all employees who earn less than
$100,000. Salary and bonus are both defined as double data types. Which of the following
selection statements would assign the correct amount to bonus?
if (salary bonus == $5000;
if (salary bonus = 5000; --- Correct
if (salary bonus = 5000;
if (salary bonus = $5000; - (answer)if (salary bonus = 5000;
if (a > 10)
if (b > 10)
if (c > 10)
result = 1;
else
, if (b > 100)
result = 2;
else
result = 3;
else
result = 4;
else
result = 5;
Using the above code segment, what is stored in result when a, b and c are equal to 200?
1 --- Correct
2
3
4 - (answer)1