1有1,2,3,4个数,能组成多少个互不相同且无重复数字的三位数?
#include <stdio.h>
int main()
{
/* 有1,2,3,4个数,能组成多少个互不相同且无重复数字的三位数?
首先,从四个数中挑出三个数来,然后把这三个数随机摆放。*/
int a[4] ={
1,2,3,4};
printf("%d",a[0]);
printf("%d",a[1]);
printf("%d\n",a[2]);
printf("%d",a[0]);
printf("%d",a[2]);
printf("%d\n",a[1]);
printf("%d",a[1]);
printf("%d",a[0]);
printf("%d\n",a[2]);
printf("%d",a[1]);
printf("%d",a[2]);
printf("%d\n",a[0]);
printf("%d",a[2]);
printf("%d",a[1]);
printf("%d\n",a[0]);
printf("%d",a[2]);
printf("%d",a[0]);
printf("%d\n",a[1]