#include<stdio.h> #define LEN 4 int main(void) { int i,j,k; char s[LEN] = {5,6,7,8}; for (i = 0; i < LEN; i++) { for (j = 0; j < LEN; j++) { for (k = 0; k < LEN; k++) { if (s[i] != s[j] && s[j] != s[k] && s[i] != s[k]) { printf("%d%d%d\n",s[i],s[j],s[k]); } } } } return 0; }