Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ggt2 {
- public static int main (String[] args) {
- int a = Integer.parseInt(args[0]);
- int b = Integer.parseInt(args[1]);
- println ("ggT = " + euklid(a,b);
- }
- static int euklid (int x, int y) {
- while (y != 0){
- if (x > y)
- x = x - y;
- else
- y = y - x;
- return x;
- }
- }
- }
Add Comment
Please, Sign In to add comment