#include <stdio.h>
int main(void)
{
int i = 0;
int j = 0;
int k = 0;
int m = 0;
int num = 0;
int count = 0;
for(i=1;i<5;i++)
{
for(j=1;j<5;j++)
{
for(k=1;k<5;k++)
{
m++;
if(i != j && j!=k && i!=k)
{
num = i*100+j*10+k;
printf(" %d ",num);
if(m%10 ==0)
{
printf("\r\n");
}
count++;
}
else
{
}
}
}
}
printf("\r\n count is %d \r\n",count);
return 0;
}