package 习题集1;

import java.util.Scanner;

//将一个正整数分解质因数。例如输入90,打印出90=2*3*3*5
public class Demo04 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int count = sc.nextInt();
System.out.print(count + "=");
for (int i = 2;i < count / 2 + 1;i ++) {
if (count % i == 0) {
System.out.print(i + "*");
count = count / i;
i = 1;
}
}
System.out.println(count);
}
}

最新文章

  1. Design Patterns Simplified - Part 2 (Singleton)【设计模式简述--第二部分(单例模式)】
  2. [bzoj3670][2014湖北省队互测week2]似乎在梦中见过的样子
  3. JDIC 访问Web时NullPointerException
  4. Effective C++ -----条款05:了解C++默默编写并调用哪些函数
  5. Quartus中添加时序约束
  6. So easy Webservice 2.WebService介绍
  7. CF Playing with Paper
  8. Keil_uvision_4基本使用教程
  9. 解决从github下载web的源代码部署到eclipse的问题
  10. Linux命令--链接文件的那些事
  11. stack around the variable “ ” was corrupted
  12. java的url 中国的争论导致了扭曲
  13. JSR-303校验类型
  14. grafana备份
  15. Git - 生成 ssh key for Mac
  16. Java中List的sort排序重写
  17. YII2常用知识点总结
  18. SaltStack 和 Ansible 的简单比较
  19. innerText兼容处理
  20. [EWS]查找 文件夹

热门文章

  1. 常用Java API: ArrayList(Vector) 和 LinkedList
  2. 算法:N-皇后问题
  3. popStar手机游戏机机对战程序
  4. Oracle 19c 单机
  5. element-UI 中的upload组件如何添加token?
  6. Vue 基础自查——watch、computed和methods的区别
  7. springboot注解之容器功能
  8. 1.在项目中使用D3.js
  9. 学习JS的第二天
  10. Typora图片自动上传至码云