You are on page 1of 1

Begin

Declare
Array Name[100] As String
Array Avg[100] As real
max,count,x As integer
namemax As String
Response as boolean
x<-0
max<-0
Print " Would you like to enter a students name and average"
Read response
While response= yes Do
Print" Enter the name of the student"
Read name[x]
Print"Enter the average of the student"
Read avg[x]
Print" Would you like to enter another students information"
Read response
If response='YES' then
x<-x+1
Endwhile

For count<-0 to x do
If max < avg[count] then
max = avg[count]
namemax<-name[count]
EndIf
Endfor
Print"The student with the greatest average is",namemax,"with average",max
End

You might also like