You are on page 1of 6

COLLEGE OF COMPUTER STUDIES AND MULTIMEDIA ARTS

CCS0006L
(COMPUTER PROGRAMMING 1)

EXERCISE

2
PROGRAM LOGIC DESIGN AND FORMULATION

Student Name / Group


Name:

Name Role
Members (if Group): Artus Artigas
Alec Jovellanos

TB02
Section:
Marie Luvett Goh
Professor:

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

● DISPLAY volume OUTPUT


volume
● COMPUTE volume:= length x width x height
● ENTER length, width, height END

volume = length x INPUT


width x height length,
width,

CCS0003L-Computer Programming 1 Page 2


of 6
Pseudocode Flowchart
(in correct order) (in correct order)
● ENTER length, width, height
● COMPUTE volume:= length x width x
height
● ENTER length, width, height

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
● ENDIF END
● IF num mod 2 = 1 OUTPUT
“It is not
● ELSE DISPLAY “It is not odd.” odd.”
Is
num
mod 2 = INPUT
1? number

Pseudocode Flowchart

CCS0003L-Computer Programming 1 Page 3


of 6
(in correct order) (in correct order)

ENTER number
IF num mod 2 = 1
THEN DISPLAY “It is odd.”
ELSE DISPLAY “It is not odd.”
ENDIF

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

Pseudocode Flowchart

CCS0003L-Computer Programming 1 Page 4


of 6
● PRINT number START
● WHILE number >= 1 number = 10
● SET number = 10 END
● ENDWHILE
● DECREMENT number number = number -
1
Is
number
>= 1? OUTPUT
number

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

SET number = 10
WHILE number >= 1
PRINT number
DECREMENT number
ENDWHILE

CCS0003L-Computer Programming 1 Page 5


of 6
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 6


of 6

You might also like