-- 02)Simple interest

Declare
p int;
r int;
t int;
q int;
s float;
e exception;

begin
p:=:p;
r:=:r;
t:=:t;
if ((p=0) or (r=0) or (t=0)) then
  raise e;
else
q:=(p * r * t);
s:=q/100;
dbms_output.put_line('Simple interest = '||s);
end if;
exception when e then
dbms_output.put_line('0 value not allowed!');
end;
/

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: