Professional Documents
Culture Documents
Mark=0
2
FOR count = 1 to 5
3
INPUT Mark
5
OUTPUT( Mark )
9
4
ARRAY DECLARATION
LOWER AND UPPER
BOUNDARY
1 101 Absar
2 102 Zawad
3 103 Maher
Student_Name[3]=Maher
-- --
-- --
INPUT NAME
Found=False
FOR count = 1 to 8
IF Student_Name[count]=NAME
Found=True
position=count
IF Found=True
OUTPUT “ Found in position”, position
ELSE
OUTPUT “ Not Found”
SWAP VALUES NUMBER
50 30 60 65
TEMP=NUMBER[3]
Temp NUMBER[3]=NUMBER[4]
NUMBER[4]=TEMP
BUBBLE SORT ID[5]
3 5 2 4 1
[1] [2] [3] [4] [5]
FOR outer = 1 TO 4
FOR count=1 TO 4
IF ID[count]>ID[count+1]
temp=ID[count]
ID[count]=ID[count+1]
ID[count+1]=temp
END FOR
END FOR
3 5 2 4 1
3 2 4 1 5
2nd Highest value got his
own position
AFTAR 2nd LOOP
2 3 1 4 5
[2,3] position
DECLARATION AND
INITIALIZATION
FOR i =1 to 3
DECLARE Mark : ARRAY[3][4] of INT FOR j= 1 to 4
Mark[ i ] [ j ]=0
or
Mark=[3][4] 0000
0000
0000
ACCESSING ARRAY ELEMENT
FOR i =1 to 3
FOR j= 1 to 4
Mark[ i ] [ j ]=0 Mark [2][3]= 1
0000
0000 0010
0000 0000
0000
DISPLAY 2D ARRAY
FOR i =1 to 3
FOR j= 1 to 4
OUTPUT Mark[ i ] [ j ]
ACTIVITY
Write a pseudo code to take a name from user and find his number from already stored arrays (
NAME[] and MARKS[ ])
Consider there is 2D array to hold NAMES of students along with ENGLISH and BANGALI
marks. Write a pseudo code to take a name from user to return his BANGALI MARKS from
Array.
ACTIVITY
Write a pseudo code to create a table like below to have students marks and their names . Headings and Names Can be ignored.
NAME. PHY CHEM. BIO
ABSAR. 0 0 0
KAFIL. 0 0 0
MASRUR. 0 0 0
After creating the array insert “A” to all student for PHYSICS as shown below.
-5 -5 -5
-5 -5 -5
-5 -5 -5
-5 -5 -5
-5 -5 -5
-5 -5 -5
-5 -5 -5
FLIP IMAGE
1 B 0 0 B 1
1 B 0 0 B 1
1 B 0 0 B 1
1 B 0 0 B 1
Data=[4][3]