Here you will get pl/sql program for armstrong number.
A number is said to be an armstrong number if sum of its digits raised to the power n is equal to number itself, where n is total digits in number.
For example 407 is armstrong number as 43 + 03 + 73 = 64 + 0 + 343 = 407.
PL/SQL Program for Armstrong Number
declare n number:=407; s number:=0; r number; len number; m number; begin m:=n; len:=length(to_char(n)); while n>0 loop r:=mod(n,10); s:=s+power(r,len); n:=trunc(n/10); end loop; if m=s then dbms_output.put_line('armstrong number'); else dbms_output.put_line('not armstrong number'); end if; end; /
Output
armstrong number
I need a one programmer contact mobile number please tall me your mobile number
Thanks Buddy!
You made the concept easy thankyou very much !
its very easy concept
thank you !