title: factorial of a number in pl/sql
body: <p>The following pl/sql program generates an error on execution on line the sum :=temp*sum; encountered symbol ; when expecting ( . Please explain my mistake.</p>
  
  <pre><code>declare
    n number;
    temp number;
    sum number := 1;
  begin
    n := &amp;n;
    temp := n;
    while temp&gt;0 loop
      sum := temp*sum;
      temp := temp-1;
    end loop;
    dbms_output.put_line('Factorial of '||n||' is '||sum);
  end;
  /
  </code></pre>