I was writing a simple program of senior citizen checking. But the error baffled me. The code as follows
declare
gen char(1);
age number(3);
begin
gen:='&gen';
age:=&age;
if age>65 and gen='m'
then
dbms_output.put_line("senior citizen");
elsif age>60 and gen='f'
then
dbms_output.put_line("senior citizen");
else
dbms_output.put_line(" not a senior citizen");
endif;
end;
error at line 20:
ora 06550:line 20, column 4
pls-00103:encountered symbol ';' when expecting one of the following if
I really don't know what is wrong