the max common divisor:
int CMaxDivisorDlg::Compute(int a, int b){
int max,min;
max = a > b ? a : b;
min = a + b - max;
int temp;
while( min ){
temp = min;
min = max % min;
max = temp;
}
return max;
}