Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ggt{
- public static void main (String[] args){
- System.out.print("Bitte erste Zahl angeben");
- int x;
- x = Stdin.readInt();
- System.out.print("Bitte zweite Zahl angeben");
- int y;
- y = Stdin.readInt();
- while(y != 0){
- if(x>y)
- x = x-y;
- else
- y = y-x;
- }
- return x;
- }
- }
Add Comment
Please, Sign In to add comment