You are on page 1of 1

CMPD144 PROGRAMMING 1

LAB1
Lab 1: Flowchart & Pseudocode

Objectives

By the end of this lab session, you should be able to:

1. Write a pseudocode and draw a flowchart based on a given problem


2. Apply the concept of sequential, selection & repetition control structure in pseudocode and
flowchart

Exercise

1. Write a program using pseudocode and flowchart to calculate the average of three numbers. The
program will accept the input from user, sum up all the input, calculate the average and and finally
print out the result. (Loop is not required in this program)

2. Write a program using pseudocode and flowchart to calculate a worker’s pay with overtime. The
user will input the total working hours and rate per hour. If the total working hours is more than 40,
the calculation will include overtime based on the following formula:

pay = 40 x rate + (hours – 40) x 1.5 rate

If the total working hours is 40 and below, the program will just calculate basic pay. The program
will then print the result.

3. Write a program using pseudocode and flowchart to calculate the average of 15 numbers using a
loop. The numbers is input by user and the program will print the result at the end.

You might also like