2007 Sep 04 8:24 AM
Dear all
How can i get the square root of a number.for examle 4 from the number 16,as
16 = 4*4.
Best Regards
Bunty
2007 Sep 04 8:34 AM
DATA : in TYPE f VALUE 16 ,
out TYPE f .
CALL METHOD cl_foev_builtins=>square_root
EXPORTING
im_number = in
IMPORTING
ex_result = out.
WRITE out .
2007 Sep 04 8:34 AM
DATA : in TYPE f VALUE 16 ,
out TYPE f .
CALL METHOD cl_foev_builtins=>square_root
EXPORTING
im_number = in
IMPORTING
ex_result = out.
WRITE out .
2007 Sep 04 8:35 AM
Hii
To get the Square root: use the arithmetic Function SQRT( ).
Sample code: try...
DATA: V1 TYPE I VALUE 100.
DATA : V_ROOT TYPE I.
V_ROOT = SQRT( V1 ).
WRITE:/ 'square root = ', v_root.
<b>reward if Helpful.</b>