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

ITPLUS2-Module 3

The document discusses the sequential structure and input-process-output model for programming. It explains how a sequential structure works by performing each step until completion. The input-process-output model defines the input, processes, and output of a program. Sample problems are provided to demonstrate how to apply these concepts.
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)
19 views

ITPLUS2-Module 3

The document discusses the sequential structure and input-process-output model for programming. It explains how a sequential structure works by performing each step until completion. The input-process-output model defines the input, processes, and output of a program. Sample problems are provided to demonstrate how to apply these concepts.
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/ 3

Page 1

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

The Sequential Structure

A sequential structure is a top-down approach where each step or activity is being performed or
processed until its completion.

Step 1 Step 2 Step 3 Step 4 Step 5

Figure 3.1 Example of a sequential process

The Input-Process-Output (IPO) Model

The IPO model defines the input requirements, the different processes/decisions involved, and
the possible required outputs.

Table 3.1 The IPO model


Input Process Output
List all input requirements Write each mathematical List all output/result
here process/formula including requirements here
the assignment process and
conditions here

Declare the equivalent Substitute the variables in Write the output


variables for input the formula, assignment variables
requirements process, or condition
Page 2

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.

Table 3.2 Modified IPO model


Input Process Output
List all input requirements Write each mathematical List all output/result
here process/formula including requirements here
the assignment process and
conditions here
Declare the equivalent Substitute the variables in Write the output variables
variables for input the formula, assignment
requirements process, or conditions
Provide a sample data for Perform the mathematical Write the generated result
each listed requirement process using the 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.

Where: gross pay = number of days worked * rate per day


total deduction = sss + tax
sss = 10% of gross pay
tax = 12.5% of gross pay
net pay = gross pay – total deduction
Page 3

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).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy