Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Provided below is an if statement. Which of the following select case statements can be used to replace the if statement? if code = s

Provided below is an if statement. Which of the following select case statements can be used to replace the if statement?
if code =s then
weather =Sunny
else
if code =SC then
weather =Sunny with clouds
else
if code =C then
weather =Cloudy
else
if code CR then
weather =Cloudy with Rain
else
if code R then
weather =Rain
else
weather =Hail
endif
endif
endif
endif
endif
a.
select case
case S
weather =Sunny
case SC
weather =Sunny with clouds
case C
weather =Cloudy
case CR
weather =Cloudy with Rain
case R
weather =Rain
case else
weather =Hail
end
b.
select case code
case S
weather =Sunny
case SC
weather =Sunny with clouds
case C
weather =Cloudy
case CR
weather =Cloudy with Rain
case R
weather =Rain
case else
weather =Hail
endselect
c.
select case
case S
weather =Sunny
case SC
weather =Sunny with clouds
case C
weather =Cloudy
case CR
weather =Cloudy with Rain
case R
weather =Rain
case else
weather =Hail
endselect
d.
select case
case S
weather =Sunny
case SC
weather =Sunny with clouds
case C
weather =Cloudy
case CR
weather =Cloudy with Rain
case R
weather =Rain
else
weather =Hail
endselect
Question 30
Not yet answered
Marked out of 1.00
Flag question
Question text
Provided below is an if statement. Which of the following select case statements can be used to replace the if statement?
if grade =A then
price = price *2
else
if grade =B then
price = price *1.14
else
if grade =C then
price = price *0.9125
else
if price >50 then
price = price +5
else
price = price 4
endif
endif
endif
endif
a.
select case grade
case A
price = price *2
case B
price = price *1.14
case C
price = price *0.9125
case else
if price >50 then
price = price +5
else
price = price 4
endif
endselect
b.
select case
case A
price = price *2
case B
price = price *1.14
case C
price = price *0.9125
case else
if price >50 then
price = price +5
else
price = price 4
endif
endselect
c.
select case grade
case A
price = price *2
case B
price = price *1.14
case C
price = price *0.9125
case price >50 then
if then
price = price +5
else
price = price 4
endif
endselect
d.
select case grade
case A
price = price *2
case B
price = price *1.14
case C
price = price *0.9125
case price >50 then
price = price +5
case else
price = price 4
endselect

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

How flying airoplane?

Answered: 1 week ago

Question

Describe the disciplinary action process.

Answered: 1 week ago