一个正整数n,把它分解成质因子的相乘形式 C++

问题描述:

一个正整数n,把它分解成质因子的相乘形式 C++
只可以使用while if 和for循环语句来做
1个回答 分类:综合 2014-10-16

问题解答:

我来补答
#include void break_up(long *p,long n) { long m=n; int i=2; while(m!=1) { if(m%i==0) { if(*p!=i&&*p) *(++p)=i; else *p=i; m/=i; coutn; while(n!=0) { for(i=0;i
 
 
展开全文阅读
剩余:2000