Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Successfully reported this slideshow.

Like this document? Why not share!

- 5 problem solving with the sequenti... by Rheigh Henley Cal... 10684 views
- 6 problem solving with decisions by Rheigh Henley Cal... 13428 views
- Algorithm Designs - Control Structures by hatredai 32052 views
- Algorithms and Flowcharts by Deva Singh 226454 views
- 1 introduction to problem solving a... by Rheigh Henley Cal... 12993 views
- 7 problem solving with loops by Rheigh Henley Cal... 18856 views

5,513 views

Published on

No Downloads

Total views

5,513

On SlideShare

0

From Embeds

0

Number of Embeds

1

Shares

0

Downloads

69

Comments

0

Likes

1

No embeds

No notes for slide

- 1. Data Structures and Algorithms The Case Logic Structure @ The case logic structure is made up of several or many sets of instructions, only one of which will be selected by the user and executed by the programmer. @ The form of the case logic structure is the following: CASE OF VARIABLE = constant 1: actions for VARIABLE = constant 1 = constant 2: actions for VARIABLE = constant 2 = constant 3: actions for VARIABLE = constant 3 . . OTHERWISE actions for VARIABLE = anything else END-OF-CASEProblem Solving with the Case Logic Structure *Property of STI Page 1 of 3
- 2. Data Structures and Algorithms The Case Logic StructureFlowchart Diagram for the Case Logic Structure A CASE OF VARIABLE = Constant 1 = Constant 2 = Constant 3 OTHERWISE INSTRUCTIONS INSTRUCTIONS INSTRUCTIONS INSTRUCTIONS BProblem Solving with the Case Logic Structure *Property of STI Page 2 of 3
- 3. Data Structures and Algorithms The Case Logic Structure A C1 = Constant 1 F T C2 = Constant 2 IF V = C1 C3 = Constant 3 F T IF V = C2 C4 = Constant 4 INSTRUCTIONS FOR v = C1 F T IF V = C3 INSTRUCTIONS FOR v = C2 F T IF V = C4 INSTRUCTIONS FOR v = C3 INSTRUCTIONS INSTRUCTIONS FOR v = C4 FOR v = C4Codes B @ Codes are characters, character strings, numbers, or some combination of these types of data that a programmer uses to name the options, the constants in a case structure.Problem Solving with the Case Logic Structure *Property of STI Page 3 of 3

No public clipboards found for this slide

Be the first to comment