‎2007 Feb 19 11:52 AM
Hi Everybody,
I want to divide the number 10 by 3. so the reminder is one. How can i get this reminder. thanks in advance.
‎2007 Feb 19 11:58 AM
Hi vijay,
chk this DEMO program DEMO_DATA_CALCULATE for all arithmetic calculations
‎2007 Feb 19 11:52 AM
Hi
10 mod 3 will give remainder as 1.
Regards,
kumar
‎2007 Feb 19 11:53 AM
Hi,
do this way
v_result = 10 mod 3..
regards,
santosh
‎2007 Feb 19 11:55 AM
‎2007 Feb 19 11:55 AM
‎2007 Feb 19 11:55 AM
Use arithmetic functions( operators ) like DIV,MOD .to get the remainder and quotient.
+ Addition of operands 1 left to right
- Subtraction of the right from the left operand 1 left to right
Multiplication of operands 2 left to right
/ Division of the left by the right operand 2 left to right
DIV Integer portion of the division of the left by the right operand 2 left to right
MOD Integer remainder of the division of the left by the right operand 2 left to right
Exponentiation of the left with the right operand 3 right to left
Please reward if useful.
‎2007 Feb 19 11:58 AM
Hi vijay,
chk this DEMO program DEMO_DATA_CALCULATE for all arithmetic calculations
‎2007 Feb 19 12:05 PM
DATA: pack TYPE p,
n TYPE f VALUE '10',
m TYPE f VALUE '3.
pack = n MOD m.
WRITE / pack.
ULINE.hope this helps.