set serveroutput on
DECLARE
type stuarray is varray(5) of varchar2(10);
type grades is varray(5) of integer;
stu stuarray;
grade grades;
stuct  integer;
totgr integer;
theavg number;
BEGIN
stu := stuarray('Susan','John','Linda','David','Ann');
grade := grades(95,87,89,90,75);
stuct := stu.count;
totgr := 0;
for i in 1..stuct LOOP
   totgr := totgr + grade(i);
end loop;
theavg := totgr/stuct;
dbms_output.put_line('Total ' || stuct || ' average grade ' || theavg);
For i in 1..stuct  LOOP
  dbms_output.put_line('Student ' || stu(i) || '  Grades ' || grade(i));
end loop;
end;
/
set serveroutput off