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
dns
3d
obfuscation
access
static-site
cq5
telegram-bot
jquery-ui
data-visualization
jtextpane
extjs4.2
appcelerator-studio
libc
supervisor
frequency-distribution
symmetricds
atlassian-stash
template-engine
google-maps-autocomplete
ag
pimcore
surveymonkey
asymptotic-complexity
openmdao
winpe
testcomplete
complex-numbers
weather
login-script
yowsup
raft
salesforce-communities
watchman
linq-to-objects
postgresql-8.4
tcc
mesosphere
getchar
serde
chai-as-promised
headless
filehandle
jqchart
check-mk
mach-o
monkey
django-1.10
structuremap4
stripe-connect
slackware
node-request
reporting-services-2012
seek
simevents
cfchart
cassia
fink
invoke-sqlcmd
grgit
computer-architecture
microsoft-reporting
rubaxa-sortable
sony-lifelog-api
uncompress
sql-server-data-tools
rdflib
mirror
avahi
omnifaces
snoop
snackbar
entry-point
codeplex
functional-java
gtm-oauth2
modular
process-explorer
css-reset
virtual-pc
iboutlet
faye
multiplexing
box2d-iphone
matlab-load
android-holo-everywhere
massive
xui
dataform
http-daemon
diagrams
ruby-1.8
resharper-6.0
uideviceorientation
ajax-polling
cfwindow
tui
cuda.net
scrubyt
firefox-3
flvplayback

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