Revision Note
Revision Note
numStudents =
numStudents + 1
Declaration ELSE
Setting the name and datatype of a variable OUTPUT "Answer not recognised"
END If
Declaring variables
DECLARE counter : INTEGER NEXT X
CONSTANT Default Text < "NIA" OUTPUT "is the term over ?
REPEAT FOR X = 0 TO 2
INPUT Pw INPUT SearchName
attempts = attempts + 1 IfSearch Name == animal Names[(c]
UNTIL Pw "flower" = OUTPUT "Found"
me
NEXT X FOR Y = 0 TO
highest+o NEXT X
FOR X = 1 TO 2 Using If statements
If numbers [c) > highest names : ( "Bill" "Bob" "Sue"]
, ,
OUTPUT "Student:" names (x) output line// output the line just read
,
&otal =
total + grades [x][y] CLOSEFilE names .
Ext 1/ close the file
INPUT Score
Count = 0
FOR X 0 To = 2
FOR Y =
0 To 2
Count = Count + 1
NEXT Y
NEXT X DECLARE Maths :
ARBAY[O : 2] OF INTEGER
OUTPUT "Scores >: " score ,
"is" ,
count [012 ,
0: 2]
Function
FUNCTION add (num1 : INTEGER ,
num2 : INTEGER
RETURNS INTEGER
ENDFUNCTION
INPUT firstNuM
INPUT secondNUM
OUTPUT "Adding numbers : add /firstNum , Second Num)
"
Procedures
PROCEDURE WelcomeMSG
OUTPUT "Hello"
ENDPROCEDURE
ENDPROCEDURE
WelcomeMsy()
areaCircle (al (5)
or
-
=
= -
I
1 .
Declaration IF
.
2 Symbel & Variables IF Marks) =
10 THEN
.
3
4 Conditional
.
Lop
Starment
path
( END
-
IF
. Function Case Of
5
.
6 Sprocedure le
of Exce => Variable
17 .
Openfile condition :
Petebration
-
-
OTHERWISE OUTPUT
1 Declaration
.
SE
DECLARE Math INTEGER :
Always in
Capital Range
DIVCO 1),
2 . (/ )( = ) (1 /x) = = = >
3 .
All variables must have meanings (X ,
X
.2 2) FUNCTION
.
.
3 Loop 4 PRINT
.
WithHext
,
While FUNCTION Variable Name (Received Variable : TYPE)
CONSTANT Count
= 0 RETURNS TYPE
<The Conditio
-
WHILE Count
mu
to (Operations]
INPUT Marks END When it is Falr RETURN Vi What
Counter - Carter * 2
UNTIL Counter >9
nu
DECLARE Textin : Start
fale condition DECLARE My file :
Strin
END When it is tuve
①G OUT Run
OPENFILE CLOr T
CREN My Fil Ter With
INPUT Textin
UR
&
Pro
END PROCEDURE
RETURN
-
DECH