modular


How to Implement Euclidean's Algorithm for Modular Caluculations


I was trying to figure out the calculation 85 = 7s mod 5
I have no idea how to do it but the text book I use says it is easy to use Euclidean's algorithm for such calculations
Can some one tell me how to complete this calculation
Thanks
Here it is in C#:
public static int GCD(int a, int b)
{
while (a != 0 && b != 0)
{
if (a > b)
a %= b;
else
b %= a;
}
if (a == 0)
return b;
else
return a;
}

Related Links

How to Implement Euclidean's Algorithm for Modular Caluculations
Modular Extension

Categories

HOME
fabricjs
kentico
prism
jmeter
depth
powerpoint
battery
solaris
emscripten
gluon-mobile
retrofit2
reactive-programming
ibeacon-android
activecollab
datastage
cumulocity
pyramid
apache2.4
undertow
dynamically-generated
interbase
oculus
apktool
ceylon
autodesk-designautomation
dst
record
clickjacking
twos-complement
instantiation
hibernate-search
openerp-7
graphhopper
css-position
metawidget
mongoose-schema
softmax
tcc
vaadin-elements
dtsearch
tinymce-3
twilio-click-to-call
amq
stdmap
opengl-4
filehandle
reachability
builtins
reporting-services-2012
webjars
x-tag
nservicebus5
cassia
phpwebsocket
pushbots
kendo-upload
relativelayout
dynatree
fiware-monitoring
computer-architecture
ess
google-books
binomial-theorem
sql-server-data-tools
alloy-ui
omnifaces
snoop
android-broadcast
umlgraph
cbind
vsx
ecslidingviewcontroller
windows-embedded-standard
spring-3
jammer
beaker-testing
workitem
ui-select2
octal
jquery-1.9
alice
booksleeve
iboutlet
google-maps-mobile
pinch
automationelement
msr
django-paypal
collectionviewsource
web-garden
application-verifier
dojo-dnd
wysiwym
firefox-3
image-capture
cardspace

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App