0% found this document useful (0 votes)
17 views5 pages

Imperial f2

This document provides instructions for a laboratory exercise where students must design algorithms that solve problems using pseudocode and flowcharts. It includes 3 problems - computing the volume of a rectangular prism, determining if a number is odd or even, and printing numbers from 10 to 1 in descending order using a while loop. Students must put the pseudocode and flowchart symbols in the correct order to satisfy each problem specification.

Uploaded by

Mary Imperial
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)
17 views5 pages

Imperial f2

This document provides instructions for a laboratory exercise where students must design algorithms that solve problems using pseudocode and flowcharts. It includes 3 problems - computing the volume of a rectangular prism, determining if a number is odd or even, and printing numbers from 10 to 1 in descending order using a while loop. Students must put the pseudocode and flowchart symbols in the correct order to satisfy each problem specification.

Uploaded by

Mary Imperial
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/ 5

COLLEGE OF COMPUTER STUDIES AND MULTIMEDIA ARTS

CCS0006L
(COMPUTER PROGRAMMING 1)

EXERCISE

2
PROGRAM LOGIC DESIGN AND FORMULATION

Student Name / Group


Mary Jewel Anne H. Imperial
Name:
Name Role
Members (if Group):

Section: DW02

Professor: Ms. Ellaine


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 height
END
 ENTER length, width, height
volume = length INPUT
length, width,
x width x height
height

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

ENTER length, width, height


COMPUTE volume := length x width x
height
DISPLAY volume

CCS0003L-Computer Programming 1 Page 2 of 5


Problem 2. A pseudocode and a flowchart that determines whether the number entered is an odd
number or not.
Pseudocode Flowchart
START OUTPUT
 THEN DISPLAY “It is odd.”
“It is odd.”
 ENTER number
END
 ENDIF
 IF num mod 2 = 1 OUTPUT
 ELSE DISPLAY “It is not odd.” “It is not
Is odd.”
num mod 2
= 1? INPUT
number

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

CCS0003L-Computer Programming 1 Page 3 of 5


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) (in correct order)
SET number = 10
WHILE number=>=
SET number 101
DECREMENT number
WHILE number >= 1
ENDWHILE
DECREMENT number
PRINT
PRINTnumber
number
ENDWHILE

CCS0003L-Computer Programming 1 Page 4 of 5


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