CCS0006L (Computer Programming 1) : Exercise
CCS0006L (Computer Programming 1) : Exercise
CCS0006L (Computer Programming 1) : Exercise
CCS0006L
(COMPUTER PROGRAMMING 1)
EXERCISE
2
PROGRAM LOGIC DESIGN AND FORMULATION
Section:
Teodoro Jr. Revano
Professor:
A
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]
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 height
END
ENTER length, width, height
volume = length INPUT
x width x height length, width,
height
Pseudocode Flowchart
(in correct order) (in correct order)
START A
ENTER length, width, height
COMPUTE volume:= length x width x
height END INPUT
length, width,
DISPLAY volume
height
Pseudocode Flowchart
(in correct order) (in correct order)
ENTER number
START
IF num mod 2 = 1
INPUT
CCS0003L-Computer Programming 1 Page 3 of
7 number
false
THEN DISPLAY “It is odd.”
ELSE DISPLAY “It is not odd.”
ENDIF
False
Is
num mod OUTPUT
2 = 1? “It is odd”
True
A
OUTPUT
“It is not
odd”
END
Problem 3. A pseudocode and a flowchart that prints the numbers 1 to 10 in descending order using
WHILE.
Pseudocode Flowchart
(in correct order) (in correct order)
FALSE
Is
number >= END
1?
TRUE
OUTPU
T
number
number=number-
1