Three rules :
1. Quotient is of same sign as that of dividend.
2. Remainder is of the same sign as that of dividend.
3. abs(divisor) > abs(remainder)
~Vishal
On 4/24/06, Thati ravi <[EMAIL PROTECTED]> wrote:
How do you do ??
this is regarding the Q
Can you guys tell me what will the answers of following operations:
1. -22 % 3 = ?
2. 22 % -3 = ? (This one I know actually, it will be 2, I know the
calculation but do not know the explanation)
3. -22 % -3 = ?
Answers::
1. -1
explanation :
3)-22 ( -7
-21
----------
-1 as remainder
2. 1
explanation:
-3) 22 ( 7
21
-------
1 as remainder
3. -1
explanation:
-3) -22 ( 7
-21
---------
-1 as remainder
I hope they will help you ...
Ravi.Thati.
--
Vishal Padwal
Tel : 631-645-1406
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---