diff --git a/GCD.java b/GCD.java new file mode 100644 index 0000000..97891cc --- /dev/null +++ b/GCD.java @@ -0,0 +1,17 @@ +public class GCD { + public static void main(String[] args) { + gcd(270,192); + + } + static void gcd(int x,int y) + { + int temp; + while(y!=0) + { + temp=x%y; + x=y; + y=temp; + } + System.out.println(x); + } +}