You are on page 1of 1

Codes to be memorized

DATA TYPES DATA STRUCTURES


1_ SORT
BUBBLE Simple
STRING INTEGER REAL BOOLEAN DATE CHAR V - Variables ~constants 2- BUBBLE Efficient
SORT

2.g
"MAK 12" 20,-100-91.81, 10.11
Fractional
TRUE
FAISE DD/mm/yyxy al!,2' ARRAYS -
Entities that thatdoes not
Entity 3- BUBBLE SORT
is efficient

changeits Vale digit


Alphanumenic whole ONLY TWO Basic
formatONLY Character
Dimension/2Dimension
ONE

the
change wording Explanation
in
Numbers Numbers States -
can

SELECTION STATEMENTS -

can store multiple values values doing


-
All elements has same DatiType. execution
of Program CONSTANT
Name 8 "MAK
"
F... THEN ELSE... ENDIE CASE
... OF... OTHERWISE ENDCASE
Prefessed When Store on basis
of Indexes.
e.g e.g
-
...

↓ ...

BECLAREName:ARRAY11:10] OF STRING Name: "MAK"


IF X; 10 CASE OF X too
many options 1:8] i
THEN 1: OUTPUT"Good" available Student:
DECLARE
ARRAY2!: 4, of STRING

OUTPUT "Hi"
2 TO 10:OUTPUT "Average" ~Name
of lower Bound Upper Bound Name 8 "Rahil"
ABBAY Row Row I
"Better"
x 15: OUTPUT DATA
TYPE
uppercolumn
EISE
Bound
"Error" of ARRAY BUBBLE SORT CODE
OUTPUT "30000" OTHERWISE: OUTPUT

RELATIONAL
END IF ENDCASE Logical OPERATORS n = MaxIndex-1

Y Greates than sauds to


=

AND REPEAT

Oops Iterations TEXT FILES-Used > Greates than



to stove Data
pamanently OR NOSWAPT TRUE

NOT
I Less than
MODES OF OPERATION FOR j0 I Ton

POST Condition X Less than


=
Equals to
Unconditional
Count Control loop Pre-Condition loop -

READ:Reading FROM AN EXISTING FILE Num[j]


IF > NumIj+1]

WHILE. . . ENDWHILE REPEAT UNTIL <) NOT EQUALSTO


FOR To NEXT TEXT File
- -
- ... ...
...
WRITE: CREATING NEW THEN

-
Used when number
of
iterations are
fixed
-

Loop ends when condition is FALSE -


Atleastonce this
loop Run. READING Line:READFILE
A "MAK.
Het", time COMMENTS Equals
= to
Temp (Num(j)
By Default +1 Increment
found DO Ends when condition is TRUE
Automatically moves to 11 We two Nom[j] > Nrm(j+13

WHILE
TRVE can use
- -
-
:

next line.
REPEAT slashes Nrm(j+1]e Temp
FOR Index: I To 10 Line:
WRITING A WRITEFLE"MAk.It", line forward for
OUTPUT Index :INDUT NUm
-Automatically moves to next comments. NOSWAP U FALSE

line
Index
NEXT END WHILE : -
Read/write
operation is
performed sequencially CONSTANT ENDIf

WNT1 10
Num= CLOSEFILE"MAK. Het
"
CONSTANT HorlyRate 6.5 NEXT j

FUNCTION PROCEDURE Aoithmetic Operatoos n < n- 1

Built-In-Functions UNTIL
specific task
matiplypride
Always Return value Code that I NOSWAPI TRWE
performs a
--
-
-
a

-
Has DataType -
No DataType > 6 And sun Raised to the pown.
LENGTH "MAKCS "
-
value can be used. -

Neva Return a value X r

FUNCTION RETURNS INTERER


MAK
Display
PROCEDURE () calculating length of Steing
-

:RETURN X "may" asten


OUTPUT
mak
CASE "Mak"
a r
SID FUNCTION END PROCEDURE F
LOW CHART STRUCTURE Diagrams
9
MAK sconverting string
S
into lower case START End
SOR

PARAMETERS W UCASE "mak"


Calculate and
display Average of two Numbers.
I >OR OUTPUT
INPUT
-

Num
No of
Pre-define inputs -MAK
wr.sweetestinthearchate
- in
TYPES Errors
of
functions and procedures. X
y i
10

y 1
>
Processing Average
Logical Syntax Run-Time
- +

>Parametes
>Selecting specific
I
numbe
Ex000 that coluses
starting
-

An 50000 the An E0000 which


logic
-

in
-

in
-

MAX)
PROCEDURE INTEGER) characters.
X:
of
the solution. a
program
statement
program execution of characte
X=-
INT(3.9) > Built-In
X r x 1
+
-
Code does not
podrie does not
follow the Rules to be crashed or
functions
the result
required. of hanguage. halt.
X ROUND 23.49,
Display
1

Calculate
OUTPUT X, Y -
White Box -

Compiler
-
WhileBox r IS
X < 10? YES, Impur Numbers
-23. S ~Decimal Aug
place
Decision Box
END PROCEDURE >

PROGRAM DEVELOPMENTCYCLE ~NO


I ~ RANDOM
Analysis Design
CALL MAK S ~Generates a Random Number > Connector
maintenance Lode
used 0-1 Inclusive
Only for procedron
Testing
1.0
not
for functions. -eg 0.65, 0.33, 0.99,0.0,

You might also like