Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

COLLEGE OF COMPUTER STUDIES AND MULTIMEDIA ARTS

CCS0006L
(COMPUTER PROGRAMMING 1)

EXERCISE

2
PROGRAM LOGIC DESIGN AND FORMULATION

Student Name /
Group Name:
Name Role
Jorell Andrei Finez
Members (if Group):
Joana Ester Reyes

Section:
TW03
Professor:
Marie Luvett Goh
I. PROGRAM OUTCOME/S (PO) ADDRESSED BY THE LABORATORY EXERCISE
 Apply knowledge through the use of current techniques and tools necessary for the IT profession.
[PO: I]

II. COURSE LEARNING OUTCOME/S (CLO) ADDRESSED BY THE LABORATORY EXERCISE


 Solve computing problems using design tools that meets specific requirements. [CLO: 1]
III. INTENDED LEARNING OUTCOME/S (ILO) OF THE LABORATORY EXERCISE
At the end of this exercise, students must be able to:
 Identify and describe the symbols used in flowcharting
 Identify and apply the convention in creating pseudocodes
 Design algorithms that solves a problem using pseudo code and flowcharts.

IV. LABORATORY EXERCISE


Directions: Arrange the statements to form the pseudocode and put in order the symbols in the
flowchart that will satisfy the given problem specification. Put your final answers in the box.
Problem 1. A pseudocode and a flowchart that computes for the volume of rectangular
prism.
Pseudocode Flowchart
START OUTPUT
 DISPLAY volume volume
 COMPUTE volume:= length x width x END
INPUT length,
height volume = width, height
 ENTER length, width, height length x width
x height

Pseudocode Flowchart
(in correct order) (in correct order)

CCS0003L-Computer Programming 1 Page 2


of 5
START
ENTER length, width, height
COMPUTE volume:= length x width x INPUT length,
height width, height
DISPLAY volume

volume = length x
width x height

OUTPUT
volume

END
Problem 2. A pseudocode and a flowchart that determines whether the number entered
is an odd number or not.
Pseudocode Flowchart

 THEN DISPLAY “It is odd.” START OUTPUT


“It is odd.”
 ENTER number END
 ENDIF OUTPUT
 IF num mod 2 = 1 “It is not
 ELSE DISPLAY “It is not odd.” Is odd.”
num INPUT
//we used “number” as variable name na mod 2 = number
lang po kasi don po sa IF “num” lang po 1?
yung nakalagay po eh and I think num is
pertaining to number to check if it is an
odd or not

Pseudocode Flowchart
(in correct order) (in correct order)

CCS0003L-Computer Programming 1 Page 3


of 5
START

ENTER number
IF number mod 2 = 1 INPUT
THEN number
DISPLAY “It is odd.”
ELSE
DISPLAY “It is not odd.”
ENDIF Is
FALSE OUTPUT
number
mod 2 = “It is not
1? odd.”

TRUE
A
OUTPUT
“It is odd.”
A
END

Problem 3. A pseudocode and a flowchart that prints the numbers 1 to 10 in descending


order using WHILE.

Pseudocode Flowchart

 PRINT number START


number = 10
 WHILE number >= 1
END
 SET number = 10
 ENDWHILE
 DECREMENT number number = number
-1
Is
number
>= 1? OUTPUT
number

Pseudocode Flowchart
(in correct order) START
(in correct order)

CCS0003L-Computer Programming 1 Page 4


of 5
SET number := 10
WHILE number >= 1
PRINT number number = 10
DECREMENT number
ENDWHILE

Is FALSE
number END
>= 1?

TRUE
OUTPUT
number

number = number - 1

V. REFERENCES
 Abraham (2015). Coding for dummies. John Wiley and Sons: Hoboken, NJ
 Zak, D (2015). An Introduction to Programming with C++. 8th Edition
 Cadenhead, R et. Al. (2016). C++ in 24 Hours, Sams Teach Yourself (6th Edition).Sams
Publishing
 McGrath, M. (2017). C++ programming in easy steps (5th ed.). Warwickshire, United
Kingdom: Easy Steps Limited
 Tale, T. (2016). C++: The Ultimate Beginners Guide to C++ Programing. CreateSpace
Independent Publishing Platform
 http://naveenkandwal.blogspot.com/2014/01/flowchart_18.html

CCS0003L-Computer Programming 1 Page 5


of 5

You might also like