title: A frustrating PL/SQL Error...PLS-00103
body: <p>I have been learning PL/SQL for one of my classes and I am having a difficult time debugging the PLS-00103 error. I have searched the error online, but the solutions I have found aren't necessarily specific enough to solve my problem. Maybe I just need a few more eyes on this. Below you will find my code and the corresponding error message. Thank you in advance! The sample output is below the error.</p>
  
  <p>Code:</p>
  
  <pre><code>create or replace procedure pro_AvgGrade as
  
  min_avg NUMBER := 100;
  max_avg NUMBER := 0;
  bins NUMBER := 0;
  binlen NUMBER := 10;
  temp NUMBER := 0;
  binprint NUMBER := 0;
  
  CURSOR grades IS SELECT AvgGrade FROM (SELECT DeptName, AVG(GradeAsPercentage) AS AvgGrade FROM Department JOIN Course on Department.DeptId = Course.DeptId JOIN Offering on Course.CourseId = Offering.CourseId JOIN Registration on Offering.OfferingId = Registration.OfferingId GROUP BY DeptName ORDER BY DeptName ASC);
  
  grade_tuple grades%ROWTYPE;
  
  BEGIN
      open grades;
  
      for grade_tuple in grades loop
          temp := grade_tuple.AvgGrade;
          if (temp&gt;max) then
              max_avg := temp;
          elsif (temp&lt;min) then
              min_avg := temp;
          end if;
      end loop;
  
      close grades;
  
      binprint := min_avg;
      bins := max_avg-min_avg;
      bins := bins/binlen;
      dbms_output.put_line('DeptName       AvgGrade:       ');
  
      LOOP
          dbms_output.put('&gt;' || min_avg || ',' || '&lt;=');
          min_avg := binlen+10;
          dbms_output.put(min_avg);
          dbms_output.put('     ');
          i := i+1;
          EXIT WHEN i&gt;bins;
      END LOOP;
  
  END pro_AvgGrade;
  /
  
  
  begin
  pro_AvgGrade;
  end;
  /
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>    LINE/COL ERROR
  -------- -----------------------------------------------------------------
  19/15    PLS-00103: Encountered the symbol ")" when expecting one of the
       following:
       (
  
  21/18    PLS-00103: Encountered the symbol ")" when expecting one of the
       following:
       (
  </code></pre>
  
  <p>Sample Output:</p>
  
  <pre><code>DEPTNAME  AVGGRADE:  &gt;70, &lt;=80  &gt;80,&lt;=90
  </code></pre>