ackage cn.flywater.FiftyAlgorthm;
public class TenthTreeFall {
static double height = 100;
static double distance = 100;
public static void main(String[] args) {
for(int i=1; i<10; i++) {
distance = distance + height;
height = height / 2;
}
System.out.println("路程:" + distance);
System.out.println("高度:" + height / 2);
}
}
/*【程序11】
* 作者 若水飞天
题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?
1.程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去 掉不满足条件的排列。
*/
/*算法:3个for循环加一个if语句;
*
*/
package cn.flywater.FiftyAlgorthm;
public class EleventhNumberRange {
public static void main(String[] args) {
int count = 0;
for(int x=1; x<5; x++) {
for(int y