Question

The CASE structure extends the selection control structure from a choice between two values to a...

The CASE structure extends the selection control structure from a choice between

two values to a choice between multiple values. How else can you express a

choice between multiple values in pseudocode?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Pseudo Code:

Select Case charFlightCode

Case 'F','A'

PRINT "First Class"

Case 'B','Q'

PRINT "Business Class"

Case 'Y','S', 'M'

PRINT "Full Fare Economy"

Case 'K','C'

PRINT "Preferred Economy"

Case 'U','J','P','G'

PRINT "Economy"

Case Else

PRINT "Unknown"

End Select

We can also represent this using nested if or else-if ladder pseudo-code structure.

Feel free to comment for any doubts or modifications!

Add a comment
Know the answer?
Add Answer to:
The CASE structure extends the selection control structure from a choice between two values to a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT