ITPLUS2-Module 3
ITPLUS2-Module 3
Fundamentals of Programming
Module 3
The Sequential Structure
Objectives
• To interpret the flow of the sequential structure;
• To design the Input-Process-Output (IPO) model together with the Desk Checking activity to
determine and understand about the program requirements; and
• To create flowcharts that depict proper and desirable solution to the given problems and
perform the necessary program simulation.
Topics
1. The Sequential Structure
2. The Input-Process-Output Model
3. Desk Checking
4. Sample Problems
A sequential structure is a top-down approach where each step or activity is being performed or
processed until its completion.
The IPO model defines the input requirements, the different processes/decisions involved, and
the possible required outputs.
Fundamentals of Programming
Desk Checking
In order to justify the accuracy of the listed requirements in the IPO model, desk checking is
added (fourth row of Table 3.2). In this approach, each listed program requirement in the
modified IPO model is represented with a sample data.
Sample Problems
a. Input two (2) numbers. Compute and display the sum of the input numbers.
b. Input two (2) numbers. Compute and display the sum, difference, product, and quotient of
the input numbers.
c. Input four (4) numbers. Compute and display the average of these numbers.
d. Input the following: student name, four (4) quiz scores, and prelim exam score. Compute the
prelim grade. Lastly, display the student name together with the prelim grade.
Where: prelim grade = 60% of the average quiz scores + 40% of the prelim exam score
e. Input the following: employee name, number of days worked, and rate per day. The outputs
are: employee name, gross pay, total deduction, and net pay.
Fundamentals of Programming
f. The formula for the area of circle is expressed as A = ∏r2. Where A is the area of a circle, ∏
(PI) has a constant value of 3.1416, and r is the radius of the circle. Input the radius of the
circle. Compute and display the value of the area of circle.
g. Input three numbers. Get the sum of the first two numbers, difference of the last two
numbers, and product of the first and the last numbers. Display the result of sum, difference,
and product.
h. Given: w = x2 + xy + y2. Input the value of x and y. Output the value of w afterwards.
i. The area of a square is computed as A = S2, where S is the side of the square. Input the
value of the side (S) of the square and output its area (A).