title: pl/sql even and odd sum block
body: <p>I have a pl/sql programming question: For numbers between 1..50, you need to multiply even numbers by five, odd numbers by 3 and then find sum of all the numbers in the result.</p>
  
  <p>So I had this so far</p>
  
  <pre><code>DECLARE
  ln_num NUMBER :=0;
  ln_num1 NUMBER :=0;
  ln_num2 NUMBER :=0;
  
  BEGIN
      for i in 1..50 loop
  
          if mod(i,2) =0 then            
          ln_num:=i*5;
  
          elsif mod(i,2) = 1 then
          ln_num1:=i*3;
  
          ln_num2 := ln_num+ln_num1;
          dbms_output.put_line(ln_num2);
  
          end if;
      end loop;
  END;
  </code></pre>
  
  <p>This gives me a last list of numbers but i need the sum of all of them. I was wondering what I was missing and how do I fix this?</p>
  
  <p>Thanks</p>