一些数据计算算法

分解质因数

void prim(int m, int n)
 {
     if (m >= n)
     {
         while (   m%n     ) n++;
         (  m = m/n   );
         prim(m, n);
         cout << n << endl;
     }
 }

就是短除法

原文地址:https://www.cnblogs.com/hong2016/p/7082406.html