#include<iostream> #include<cmath> using namespace std; int main(){ int n,count=0,x=2; cin>>n; cout<<n<<"="; while(n>1){ if(n%x==0){ if(n/x==1) {cout<<x;break;} n =n/x; count++; cout<<x<<"*"; } else{ x++; } } }
解题思路:
注意事项:
参考代码:
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题8.8 (C语言代码)浏览:1433 |
C语言程序设计教程(第三版)课后习题9.2 (C语言代码)浏览:556 |
1017题解浏览:605 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:530 |
局部变量作函数返回值的问题浏览:981 |
妹子杀手的故事 (C语言代码)浏览:1054 |
计算质因子 (C语言代码)浏览:707 |
陶陶摘苹果2 (C语言代码)浏览:601 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:519 |
买不到的数目 (C语言代码)浏览:3094 |