FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Algorithms/AlgoritmoEuclides.java at master · jphber/Algorithms · GitHub
jphber
/
Algorithms
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Algorithms
/
AlgoritmoEuclides.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (28 loc) · 558 Bytes
Breadcrumbs
Algorithms
/
AlgoritmoEuclides.java
Copy path
File metadata and controls
34 lines (28 loc) · 558 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package
com
.
applikdos
.
algoritmos
;
public
class
AlgoritmoEuclides
{
public
static
void
main
(
String
[]
args
) {
int
num1
=
12
,
num2
=
82
;
int
resultado
=
0
,
resto
;
int
mayor
,
menor
;
if
(
num1
>
num2
){
mayor
=
num1
;
menor
=
num2
;
}
else
{
mayor
=
num2
;
menor
=
num1
;
}
int
dividendo
=
mayor
;
int
divisor
=
menor
;
resto
=
dividendo
%
divisor
;
if
(
resto
==
0
){
resultado
=
divisor
;
}
while
(
resto
!=
0
){
dividendo
=
divisor
;
divisor
=
resto
;
resto
=
dividendo
%
divisor
;
resultado
=
divisor
;
}
System
.
out
.
println
(
"El m.c.d es = "
+
resultado
);
}
}
Back
|
FazBrowse Home
|
New Git URL