PLSQL code to check that the given number is even or not.
declare
num1 number;
BEGIN
num1 := &enter_number; --to take input from user
if MOD(num1,2)=0
then
dbms_output.put_line('Number is even');
else
dbms_output.put_line('Number is not even');
end if;
end;
/
declare
num1 number;
BEGIN
num1 := &enter_number; --to take input from user
if MOD(num1,2)=0
then
dbms_output.put_line('Number is even');
else
dbms_output.put_line('Number is not even');
end if;
end;
/
No comments:
Post a Comment