// A program that uses euclid class import java.io.*; import euclid; // uses euclid.class if exists, otherwise compiles euclid.java class use_euclid { public static void main (String[] args) throws IOException { int a, b; euclid reduce = new euclid(); BufferedReader stdin; stdin = new BufferedReader (new InputStreamReader (System.in)); System.out.print ("Enter first integer: "); a = Integer.parseInt (stdin.readLine()); System.out.print ("Enter second integer: "); b = Integer.parseInt (stdin.readLine()); System.out.print("Their gcd is "); reduce.gcd(a,b); } }