Professional Documents
Culture Documents
Declare
Declare
Declare
Declare
Declare
Declare
Declare
SArray[40],search As string
ID[40] As real
i,b,maximum as real
choice,answer As char
swap As string
Chart[5][6], As string
found As boolean
Driver()
For i=1 to 40
print seat[i]
Print "enter student identification please"
Read ID [i]
Info()
print"enter d for descending or a for ascending"
read choice
if choice=b then
Decending()
if choice=a then
Acending()
seated()
print "Would you like to search for a student press y for yes and n for no"
read answer
if answer=y then
find()
if answer=n then
print "have a good day"
endif
end
Function Info()
For i=1 to 40 do
Print "Enter name of student Please"
Read SArray[i]
Endfor
End Info
Function decending()
for i=0 To 39 Do
for b=1 To (39-i) DO
if SArray[b]<SArray[b+1] Then
swap=SArray[b+1]
SArray[i]=SArray[b+1]
swap=SArray[i]
swap=id_num[b+1]
ID[b]=ID[b+1]
swap=ID[i]
endif
endfor
endfor
End Descending
Function acending()
for i=0 To 39 Do