Download - stuff

Transcript

BeginDeclare SArray[40],search As stringDeclare ID[40] As realDeclare i,b,maximum as realDeclare choice,answer As char Declare swap As stringDeclare Chart[5][6], As stringDeclare found As booleanDriver()For i=1 to 40print seat[i]Print "enter student identification please"Read ID [i]Info()print"enter d for descending or a for ascending"read choiceif choice=b thenDecending()if choice=a thenAcending()seated()print "Would you like to search for a student press y for yes and n for no"read answerif answer=y thenfind()if answer=n thenprint "have a good day"endifendFunction Info()For i=1 to 40 doPrint "Enter name of student Please"Read SArray[i]EndforEnd InfoFunction decending()for i=0 To 39 Dofor b=1 To (39-i) DOif SArray[b]SArray[b+1] Thenswap=SArray[b+1]SArray[i]=SArray[b+1]swap=SArray[i]swap=id_num[b+1]ID[b]=ID[b+1]swap=ID[i]endifendforendforEnd DescendingFunction Seated()Max


Top Related