Question: Can you please explain how you got the answer? 31. What will be the values of ans, x, and y after the following statements are

 Can you please explain how you got the answer? 31. What
will be the values of ans, x, and y after the following
Can you please explain how you got the answer?

31. What will be the values of ans, x, and y after the following statements are executed? int ans = 0, x = 15, y =25; if ( x >= y) { ans = x + 10; Xy; } else { ans = y + 10; y + x; } ans = y= 39. What would be the value of bonus after the following statements are executed? Int bonus, sales = 1250; if (sales > 1000) bonus = 100; if (sales > 750) bonus = 50; if (sales > 500) bonus = 25: else bonus = 0; bonus =

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!