CS126-8L: Computer Programming 1 (Laboratory) : Directions
CS126-8L: Computer Programming 1 (Laboratory) : Directions
Directions:
1. Use a Word Processor or Online Tool to create your flowchart and pseudocode. Divide
your page into two columns: flowchart should be on the left side and pseudocode on the
right.
2. Save your flowchart and pseudocode in PDF format with the filename: FLNAME-PRAC01
(e.g. GFUENTES-PRAC01.pdf)
3. Once done, upload your file on Blackboard.
4. Failure to follow instructions will get a 5-point deduction. Please be guided accordingly.
SEQUENTIAL
1. Surface Area and Volume (10 points each for Flowchart and Pseudocode)
Create a flowchart and a pseudocode to calculate the surface area and volume of a
cylinder and display the results. Use the formulas shown below
where pi (use pi instead of π) is approximately equal to 3.1416, r
is the radius and h is the height.
𝐴 = 2𝜋𝑟ℎ + 2𝜋𝑟 2
𝑉 = 𝜋𝑟 2 ℎ
SELECTION/CONDITIONAL
December 1, 2005 falls on a Thursday. Make a program that would input a numeric day
(1-31 only) and output the day of the week the day falls. For example, if 18 is entered
for the day, the program must display “SUNDAY”, if 20 was entered, “TUESDAY” must
be displayed and so on.
ITERATIVE/LOOPING
Create a flowchart and a pseudocode to find the factorial of a number n (n! = 1x2x3x…n).
Example: 5! = 1x2x3x4x5 = 120