Upcoming SlideShare
×

# 5 problem solving with the sequential logic structure

8,637 views
8,162 views

Published on

Published in: Technology, Education
3 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
8,637
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
110
0
Likes
3
Embeds 0
No embeds

No notes for slide

### 5 problem solving with the sequential logic structure

1. 1. Data Structures and Algorithms Sequential Logic StructureThe most commonly used and the simplest logicstructure is the sequential structure. All problems usethe sequential structure, and most problems use it inconjunction with one or more of the other logicstructures.Flowchart Diagram for the Sequential StructureProblem Solving with the Sequential Logic Structure *Property of STI Page 1 of 4
2. 2. Data Structures and Algorithms Sample ProblemMr. Frodo is looking for a bank that will give the mostreturn on her money over the next five years. She hasP100,000.00 to put into a savings account. The standardequation to calculate principal plus interest at the endof a period of time is. AMOUNT = P*( 1 + I/M)^(N*M)Where :P = PRINCIPAL (amount of money to invest)I = INTEREST (percentage rate the bank pays to theinvestor)N = NUMBER OF YEARS (time for which the principal isinvested)M = COMPOUND INTERVAL (the number of times peryear the interest is calculated and added to theprincipalProblem Solving with the Sequential Logic Structure *Property of STI Page 2 of 4
3. 3. Data Structures and Algorithms Sample ProblemProblem AnalysisThe required processing is the equation for theAMOUNT. Solution ideas include the following:1. Enter all input data as variables2. Enter the principal and interest as constants and the other values as variables.3. Enter the data for one bank per run.4. Enter the data for all banks per run.Problem Solving with the Sequential Logic Structure *Property of STI Page 3 of 4
4. 4. Data Structures and Algorithms Sample ProblemSolutionProblem Solving with the Sequential Logic Structure *Property of STI Page 4 of 4