You are on page 1of 2

IT NOTES

Statements
A statement is a description of an action or condition. E.g A loop statement directs
program flow to repeat a particular line of code or block of code. Key words such as
READ, WRITE, DO, WHILE, FOR, and NEXT are some examples of instructions within
the program.
Variables
A variable is a name that represents the documents a piece of data that can take
many possible values. If the variable is used in the entire program which is called a
global variable. If it is used in one pat of the program it is called a local variable.
E.g. num_1, num_2, value_1, value_2.
Data types
Data type

Description

Examples

Integer

Whole numbers, positive


and negative,
NOTE- RANGE -3268-3267

6, -1, 35, 0, 2, -4, -6, 6

Real

All numbers including


fractions

15.7, 8.9

Character

Letters, punctations

A, b, ?, ,

String

Character put together

Jushelle, bae, ely, hoe

Boolean

Caters for two outcomes+

Yes/No

Program Structure
Nearly all programs share a similar overall structure:

Statements to establish the start of the program

Variable declaration
Program statements (blocks of codes)

Program Cxc;
BEGIN
Writeln (Hello World);
END.

CXC- program name


BEGIN- denotes the start of the program
END- denotes the end of the program

You might also like