What would be the value of bonus after the following statements are executed?
Int bonus, sales = 85000;
Char dept = 'S';
If (sales > 100000)
If (dept == 'R')
Bonus = 2000;
Else
Bonus = 1500;
Else if (sales > 75000)
If (dept == 'R')
Bonus = 1250;
Else
Bonus = 1000;
Else
Bonus = 0;
A) 2000
B) 1500
C) 1250
D) 1000
Correct Answer:
Verified
Q3: If chr is a character variable, which
Q4: What will be the value of ans
Q5: In most editors, you are indenting by
Q6: What would be the value of bonus
Q7: This type of operator determines whether a
Q9: In Java, when a character is stored
Q10: The _ statement is used to make
Q11: Which of the following is the correct
Q12: A block of code is enclosed in
Q13: A flag may have the values:
A) 0
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents