Finding a Greatest Common Divisor

Write a class named GcdFinder whose main method prompts the user for two positive integers, and then displays the greatest common divisor of those integers.

Sample run:

This program will compute the greatest common divisor of two numbers
--------------------------------------------------------------------
Enter two positive integers (separated by a space): 12345 67890
The gcd of 12345 and 67890 is 15

Tags: java.util.Scanner, the remainder operator "%", while-loop