Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions