Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyHelloWorld {
- public static void main(String[] args) {
- int a = 147, b = 105;
- while (a != b) {
- if (a > b) {
- a -= b;
- } else {
- b -= a;
- }
- }
- System.out.println("GCD is " + a);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement