Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Remainder when dividing by 6
Anonymous

Date:
Remainder when dividing by 6
Permalink   


Is there a shortcut for finding the remainder when dividing by 6. For example : 837265 ÷ 6 has a remainder of _________.

__________________
fht


Long-term Member

Status: Offline
Posts: 208
Date:
Permalink   

Here it is in PigJava:

int n=the number, rem=the remainder;

If (n==odd) do the divisibility test of 3 for n; if (divisible) rem=3; else rem=1or5;
Then do the divisibility test of 3 for n-1; if (divisible) rem=1; else rem=5;

If (n==even) do the divisibility test of 3 for n; if (divisible) rem=0; else rem=2or4;
Then do the divisibility test of 3 for n-1; if (divisible) rem=4; else rem=2;

Best Wishes



__________________
Best Wishes
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard