求最大公约数
import java.io.*;public class gcd3 {
public static int gcd(int a,int b) throws IOException
{
int c = a % b ; int t; if(a < b)
{
t = b;
b = a;
a = t;
}
while( c != 0 ) {
a = b;
b = c;
c = a % b;
}
return b;
}
public static void main(String[] args) throws IOException
{ System.out.println(gcd(10,27));
}}