title: PLSQL dbms_output.put_line() is not working while taking input from user
body: <p>In my PL/SQL code I have to print some line on the console and then I have to take the choice from the user but in my case it never print anything on the console and directly wait for the user input.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>declare
  cust_id Customer.cust_id%type;
  cust_name Customer.name%type;
  cust_purchase Customer.total_purchase%type;
  cust_category varchar2(30);
  input int := 1;
  
  cursor cursor_customer is select * from Customer;
  
  begin
  
  dbms_output.put_line('Which one you want to use?');
  dbms_output.put_line('1. PROCEDURE');
  dbms_output.put_line('2. FUNCTION');
  
  input := &amp;t;
  
  open cursor_customer;
  loop
  fetch cursor_customer into cust_id, cust_name, cust_purchase;
      exit when cursor_customer%notfound;
      if (input = 1) then
          proc_grade(cust_id,cust_name,cust_purchase,cust_category);
      elsif (input = 2) then
          cust_category := func_grade(cust_id,cust_name,cust_purchase);
      end if;
      dbms_output.put_line('Category is added for the client id '|| cust_id || ' is ' || cust_category);
  
  end loop;
  
  close cursor_customer;
  
  end;
  /
  </code></pre>
  
  <p>In <strong>begin</strong> I have written three dbms_output.put_line() statements but this statements are not executing it directly waiting for the user input.</p>
  
  <p><strong>Here is the output after running the code</strong></p>
  
  <p>Enter value for t:</p>
  
  <p>But when I remove the statement which is taking the input "<strong>input := &t;</strong>" then the all the output statements are worked.</p>
  
  <p>Please anyone could tell me where I'm wrong.</p>