算法复习-欧几里得最大公因子

#include<iostream>
#include<stdio.h>
using namespace std;
int main (){
    int m=20;
    int n=8;
    int x=m;
    int y=n;
    while((x%y)!=0)
    {
        int temp=y;
        y=(x%y);
        x=temp;
    }
    cout<<y;
    system("pause"); 
    return 0;
}
原文地址:https://www.cnblogs.com/mdumpling/p/7756611.html