题目:有1、2、3、4四个数字,
能组成多少个互不相同且无重复数字的三位数?
都是多少?
public class Test11 {
public static void main(String[] args) {
int count=0;
for(int x=1;x<5;x++){
for(int y=1;y<5;y++){
for(int z=1;z<5;z++){
if(x!=y&&x!=z&&z!=y){
count++;
int result=100*x+10*y+z;
System.out.println(result);
}
}
}
}
System.out.println("一共有"+count+"个数字");
}
}