0% found this document useful (0 votes)
14 views2 pages

TCP Lab 01

The document outlines the objectives of Lab 01, focusing on the distinctions and applications of algorithms, pseudocode, and flowcharts. It provides definitions and examples for each concept, followed by four programming questions that require the creation of pseudocode and flowcharts for specific tasks, such as calculating sums and payments. The tasks involve user input and basic arithmetic operations to reinforce understanding of the programming design process.

Uploaded by

chloesim178
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

TCP Lab 01

The document outlines the objectives of Lab 01, focusing on the distinctions and applications of algorithms, pseudocode, and flowcharts. It provides definitions and examples for each concept, followed by four programming questions that require the creation of pseudocode and flowcharts for specific tasks, such as calculating sums and payments. The tasks involve user input and basic arithmetic operations to reinforce understanding of the programming design process.

Uploaded by

chloesim178
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Lab 01: Program design: Algorithm, Pseudocode, Flowchart

Objectives
 To differentiate between algorithm, pseudocode and flowchart
 To learn usage of algorithm, pseudocode and flowchart

Algorithm
It is a step by step instruction on how to solve a problem. E.g. “how to” guides on fixing your bicycle.

Pseudocode
It is a natural language like statements that focus on the logic of a problem. Pseudocode is a problem
solving design that guides you in programming. Each statement of the pseudocode should guide the
reader and the reader should be able to translate it to a specific programming language statement. E.g.
READ the height of the user.

Flowchart
A diagram that helps describe the steps of the pseudocode/algorithm using symbols and directional
arrows.

Question 1
Your program should accept 2 numbers from user then display the sum of those numbers.
Write the pseudocode and draw the flowchart.

Question 2
You are required to calculate the payment of a worker from the input Hours and Rate. The formula
for the payment is: Pay = Hours*Rate. Display the payment after the calculation.
Write the pseudocode and draw the flowchart.

Question 3
You are required to calculate the standard (you may use the answer from Question 2) and overtime
payment. The formula for the payment is given:
Standard (Less than or equal to 40 hours): Pay = Hours*Rate;
Overtime (More than 40 hours): Pay = 40*Rate + (Hours – 40)*1.5*Rate.
Write the pseudocode and draw the flowchart.
Question 4
Your program should accept 10 numbers from the user then display the average of those numbers.
Write the pseudocode and draw the flowchart.

You might also like