Finding the factors of an integer
来源:互联网 发布:常用的网络通信协议 编辑:程序博客网 时间:2024/05/20 09:23
代码:import java.util.Scanner;public class Ten_six {public static void main(String[] args) {System.out.println("Enter an int value: ");Scanner cin = new Scanner(System.in);int a = 2, x;double num = 1;x = cin.nextInt();while (a<=x) {while (x % a == 0) {x = x / a;System.out.print(+a);System.out.print(" ");}a++;}}}运行结果:
0 0
- Finding the factors of an integer
- Finding the Longest Nondecreasing Subsequence of A Given Sequence:An analysis of dynamic programming
- How to compute the square root of an integer?
- Counting-the-number-of-set-bits-in-an-integer
- Finding all elements(which are integer) in an array whose sum is equals to the element exists within
- ???Finding the Radius for an Inserted Circle
- The advInterval shall be an integer multiple of 0.625 ms in the range of 20 ms
- Reverse digits of an integer.
- reverse digits of an integer.
- Reverse digits of an integer.
- Reverse digits of an integer.
- Reverse digits of an integer.
- reverse digits of an integer
- Reverse digits of an integer.
- The Value of Forums - Finding Forums
- SCU 2401 *** The Story Of Finding Love
- Finding the type of a Tk widget
- Finding the closest pair of points
- java记——关于continue的误区
- 第六周--数制转换
- POJ 2251 Dungeon Master(bfs)
- 正则表达式 “双向最小匹配”
- EntityFramework走马观花之 CRUD(上)
- Finding the factors of an integer
- ssoj2435 回文串游戏(贪心)
- Cygwin-安装和配置ssh服务
- 第一次面试有感
- 深入浅出MyBatis-Configuration
- UI 动画之反射变换的旋转
- 直击阻塞,非阻塞,异步,同步四者联系与区别
- xml解析 dom4j通过XPath找标签
- 写出最小公因数