0% found this document useful (0 votes)
132 views

Chapter 5 Problem Solving With The Sequential Logic Structure

The document discusses sequential logic structures and provides an example problem. It introduces Mr. Frodo who wants to invest $100,000 in a bank for the highest return over 5 years. It provides the formula to calculate the amount including principal, interest rate, number of years, and compound intervals. It then analyzes the problem, identifying the required processing as the formula and potential solution ideas like entering data as variables or constants.

Uploaded by

latishy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views

Chapter 5 Problem Solving With The Sequential Logic Structure

The document discusses sequential logic structures and provides an example problem. It introduces Mr. Frodo who wants to invest $100,000 in a bank for the highest return over 5 years. It provides the formula to calculate the amount including principal, interest rate, number of years, and compound intervals. It then analyzes the problem, identifying the required processing as the formula and potential solution ideas like entering data as variables or constants.

Uploaded by

latishy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Data Structures and Algorithms

Sequential Logic
Structure

The most commonly used and the simplest logic


structure is the sequential structure. All problems use
the sequential structure, and most problems use it in
conjunction with one or more of the other logic
structures.

Flowchart Diagram for the Sequential Structure

Problem Solving with the Sequential Logic Structure *Property of STI


Page 1 of 4
Data Structures and Algorithms

Sample Problem

Mr. Frodo is looking for a bank that will give the most
return on her money over the next five years. She has
P100,000.00 to put into a savings account. The standard
equation to calculate principal plus interest at the end
of 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 the
investor)
N = NUMBER OF YEARS (time for which the principal is
invested)
M = COMPOUND INTERVAL (the number of times per
year the interest is calculated and added to the
principal

Problem Solving with the Sequential Logic Structure *Property of STI


Page 2 of 4
Data Structures and Algorithms

Sample Problem

Problem Analysis
The required processing is the equation for the
AMOUNT. Solution ideas include the following:

1. Enter all input data as variables


2. 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
Data Structures and Algorithms

Sample Problem

Solution

Problem Solving with the Sequential Logic Structure *Property of STI


Page 4 of 4

You might also like