answersLogoWhite

0


Best Answer

1)strong number

1 declare

2 n number(3);

3 fact number(3):=1;

4 rem number(3);

5 m number(3);

6 sum1 number(3):=0;

7 begin

8 dbms_output.put_line('enter a number');

9 n:=&n;

10 m:=n;

11 while(n>0) loop

12 rem:=mod(n,10);

13 for i in 1..rem loop

14 fact:=fact*i;

15 end loop;

16 sum1:=sum1+fact;

17 n:=trunc(n/10);

18 fact:=1;

19 end loop;

20 if(sum1=m) then

21 dbms_output.put_line(m' IS STRONG NUMBER');

22 else

23 dbms_output.put_line('IT IS NOT STRONG NUMBER');

24 end if;

25* end;

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Strong number in plsql
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the maximum number of handlers processed before the PLSQL block is exited when an exception occurs?

only one


Why decode is not used in plsql?

Decode can be used in PLSQL, but in version 9i and later the case statement is easier to use, more powerful and more intuitive.


Plsql procedures and functions?

Are really important in an Oracle Database.


Addition of two numbers on plsql program?

--THE SUM OF TWO NUMBERS: declare a number(2); b number(2); c number(2); begin a:=&a; b:=&b; c:=a+b; dbms_output.put_line(a ' + 'b' = 'c); end;


Is it possible to change the structure of existing view if yes then how?

using plsql sql


Which is an example of a PLSQL subprogram?

A PL/SQL subprogram is equivalent to a procedure or function in conventional procedural programming.


Write a PLSQL code to print a multiplication table where the input is given by the user in Oracle?

Declare num number(10):=# a number(10); counter number:=1; begin for i in 1..10 LOOP a:=num*counter; DBMs_output.put_line(a); Counter:=counter+1; end loop; end;


How do you compile a PLSQL procedure?

You can do that with Sql*Plus: SQL> CREATE OR REPLACE PROCEDURE foo ... IS ... END foo; / SHOW ERRORS


What are stored procedures in data bases?

Stored procedure is the pl-sql block in precomplile from and can be used to excecute plsql statement


Where can I download the book Oracle Jdeveloper 10g for Forms and PLSQL Developers by Peter Koletzke and Duncan Mills?

i cant download from ...any where


What is the phone number of the Strong Public Library in Strong?

The phone number of the Strong Public Library is: 870-797-2165.


Wap to check a number is strong number or not?

Logic Of Strong number: Take anumber.First findout the factorials of all the digits of the number.Then sum the factorials of all the digits.If that sum is equal to the entered number then that number is said to be a strong number.