Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

odd Questions 15,17,19,21 236 I Chapter 4: Control Structures : Selection oxe that score is an int variable. Consider the following if statements: if (score>=

odd Questions 15,17,19,21

image text in transcribedimage text in transcribedimage text in transcribed

236 I Chapter 4: Control Structures : Selection oxe that score is an int variable. Consider the following if statements: if (score>= 90); System.out.println ("Discount 108"); " What is the output if the value of score is 952 Justify your answer. b. What is the output if the value of score is 85? Justify your answer Suppose that score is an int variable. Consider the following if statements: i. if (score 70) i. if (score 70) 15. System.out.println("Grade is c.") System. out.printin ("Grade is C.") Answer the following questions: What is the output in (G) and (ii) if the value of score is 70? What is the a. value of score after the if statement executes? b. What is the output in (i) and (i) if the value of score is 80? What is the value of score after the if statement executes? Rewrite the following expressions using the conditional operator. (Assume that all variables are declared properly.) a. if (x -y) 16. else z=y-x; b, if (hours >= 40.0) wages 40 7.50 1.5 7.5 (hours 40); wages hours * 7.50; str -"pass"; str "Fail"; else c. if (score-60) else Rewrite the following expressions using an if.. .else statement. (Assume that all variables are declared properly.) a. (x = 10) ? drive-150 : drive-30; (booksBought > 3) 2 discount 0.15: discount 0.0

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

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

Students also viewed these Databases questions

Question

or explains? (204)

Answered: 1 week ago

Question

What are the major provisions of the Dodd-Frank Act?

Answered: 1 week ago

Question

Are the rules readily available?

Answered: 1 week ago

Question

Have ground rules been established for the team?

Answered: 1 week ago

Question

Is how things are said consistent with what is said?

Answered: 1 week ago