declare
a number;
b number;
c number;
begin
a:=&a;
b:=&b;
if(b>0)then
c:=a/b;
dbms_output.put_line('C is'||c);
else
c:=a/b;
end if;
exception
when zero_divide then
dbms_output.put_line('Divide by zero error');
end;
/
declare
age number;
inage exception;
begin
age:=&age;
if ((age>=0) and (age<200))then
dbms_output.put_line('Your Age is:'||age);
else
raise inage;
end if;
exception
when inage then
dbms_output.put_line('Invalid age error');
end;
/