Comprog and Itc
Comprog and Itc
Comprog and Itc
IT2402
Example:
The algorithm to find and display the volume of the rectangle is as follows:
4. Find the volume using the formula: volume = length x width x heights
5. Display the computed volume
The two (2) commonly used tools in representing algorithms are through a
pseudocode or a flowchart.
Pseudocode
Here are some rules that are frequently followed when writing pseudocode:
O Assignment (=)
Keywords can be used as a command, such as PRI, WRITE, READ, SET, and
GO TO.
Example:
The pseudocode to find and display the volume of the rectangle is:
READ length
READ width
READ height
SET volume to 0
STI
IT2402
Basics of Programming
Programming
Programming Paradigms
The nature of the project, requirements, and the desired programming style
are some of the basis for choosing the appropriate programming paradigm.
01 Handout 1
Student.feedback@sti.edu
STI
IT2402
Flowchart
Flowcharts are classified into two (2) categories: Program flowcharts and
System flowcharts.
Program flowcharts illustrate the logical steps in a software program or
programming task to understand a process, workflow, or algorithm. They
contain the steps of solving a problem unit for a specific result.
Symbol
Name
Terminal
Description
Input/Output
Computer Processing
Shows any processing performed by a computer system
Predefined Processing
Comment
Flow line
Document Input/Output
Used when input comes from a document, and output goes to a document
Decision
On-page Connector
Example:
01 Handout 1
Student.feedback@sti.edu
*Property of STI
Page 4 of 5
STI
The flowchart to find and display the volume of the rectangle is:
START
READ length, width, height
PRINT volume
END
STI
The program logic should only show the flow from top to bottom and/or left
to right.
Each symbol should contain only one entry point and one exit point, except
the decision symbol. It is known as the single rule.
PROP
IT2402
PROPERTY OF ST
PROPERTY OF STI
References:
01 Handout 1
Student.feedback@sti.edu
*Property of STI
Page 5 of 5
STI
IT2402
Programming Languages
Syntax
It is a set of rules defining the various combinations and ions an valid
statement in a language. Arrangements. Of symbols or characters to create a
Command
It is a software application for formatting the code, checking the syntax, and
running and testing the code. IDEs can work with multiple programming
languages, while some are specific to only one language.
Library
Interpreter
Assembler
Conver
Compiler
01 Handout 1
Student.feedback@sti.edu
*Property of STI
Page 2 of 5