Top Posters
Since Sunday
5
a
5
k
5
c
5
B
5
l
5
C
4
s
4
a
4
t
4
i
4
r
4
New Topic  
Oughto Oughto
wrote...
Posts: 742
Rep: 1 0
7 years ago
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) 1000
B) 2000
C) 1500
D) 1250
Textbook 
Starting Out with Java: Early Objects

Starting Out with Java: Early Objects


Edition: 4th
Author:
Read 129 times
3 Replies
Replies
Answer verified by a subject expert
ToothyToothy
wrote...
Top Poster
Posts: 744
Rep: 4 0
7 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

Oughto Author
wrote...
7 years ago
I mentioned in my previous post that I chose this as an elective, thanks for helping me understand
wrote...
7 years ago
I'm happy to help
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1238 People Browsing
Related Images
  
 291
  
 380
  
 396
Your Opinion
Which country would you like to visit for its food?
Votes: 204

Previous poll results: What's your favorite math subject?