Imperial f2
Imperial f2
CCS0006L
(COMPUTER PROGRAMMING 1)
EXERCISE
2
PROGRAM LOGIC DESIGN AND FORMULATION
Section: DW02
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
length, width,
x width x height
height
Pseudocode Flowchart
(in correct order) (in correct order)
Pseudocode Flowchart
(in correct order) (in correct order)
ENTER number
IF num mod 2 = 1
THEN DISPLAY "It is odd"
ELSE DISPLAY "It is not odd"
END IF
Pseudocode Flowchart
Pseudocode Flowchart
(in correct order) (in correct order)
SET number = 10
WHILE number=>=
SET number 101
DECREMENT number
WHILE number >= 1
ENDWHILE
DECREMENT number
PRINT
PRINTnumber
number
ENDWHILE