Home > database >  Oracle output daffodil number
Oracle output daffodil number

Time:09-18

Declare
A, an integer.
B the integer;
C integer;
I the integer:=100;
A_sum integer;
The begin
While i<=999
Loop
A:=mod (I, 10);
B:=mod (I/10, 10);
C:=I/100;
A_sum:=power (a, 3) + power (b, 3) + power (c, 3);
If I=a_sum then
Dbms_output. Put_line (I);
end if;
I:=I + 1;
end loop;
end;

CodePudding user response:

Well, if the format to tidy it up again, so much the better!
  • Related