代码
#include<iostream>
using namespace std;
int first=true;
void zyz(int n,int p)
{
if(n>1)
{
if(n%p==0)
{
//if(first){cout<<p;first=0;}
//else cout<<" "<<p;
cout<<p<<" " ;
zyz(n/p,p);
}
else zyz(n,p+1);
}
}
int main()
{
int n=18;
zyz(n,2);
return 0;
}