PL/SQL program to check whether a number is even or odd

In this program, you will find whether numbers entered by users are even or odd.

Even numbers are integers that are exactly divisible by 2 and have no remainder. for Example 2, 10. -16.

PL/SQL program for even or odd number

declare
n number;
begin
n:=&n;
if(mod(n,2)=0) then
 dbms_output.put_line(n||' is even number');
else
dbms_output.put_line(n||' is odd number');
end if;
end;
/

output

Enter value for n: 12
old   4: n:=&n;
new   4: n:=12;
12 is even number