package 习题集2;
//有1,2,3,4四个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?
public class Demo1 {
public static void main(String[] args) {
chank();
}
public static void chank(){
for (int i = 1;i <= 4;i ++){
for (int j = 1;j <= 4;j ++){
for (int k = 1;k <= 4;k ++){
if (i != j && i != k && k != j){
System.out.println("可以组成:" + i + j + k);
}
}
}
}
}
}
/*
2.
int count = 0;
for (int i = 1;i <= 4;i ++){
for (int j = 1;j <= 4;j ++){
for (int k = 1;k <= 4;k ++){
if (i != j && i != k && j != k){
count ++;
System.out.println(i * 100 + j * 10 + k);
}
}
}
}
System.out.println(count);
*/