1 #include <iostream>
2 using namespace std;
3
4 void getResult(
long int input)
5 {
6 for (
int i=
2;i<=input;i++
)
7 {
8 while((
0==input%i)&&input!=
0)
9 {
10 cout<<i<<
" ";
11 input=input/
i;
12 }
13 }
14
15 }
16
17 int main()
18 {
19 int a;
20 cin>>
a;
21 getResult(a);
22 return 0;
23 }
转载于:https://www.cnblogs.com/zaijiefangbeidawang/p/8380054.html
相关资源:JAVA上百实例源码以及开源项目
转载请注明原文地址: https://mac.8miu.com/read-80123.html