OK, this part, I understand - very simple:
Code:
The C program should check just this combinations(a23a -> a is the same digit):
1231
2232
3233
4234
5235
6236
7237
8238
9239
But 2 mod six is not 0, so the mynumber % 6==0, part, is confusing me. As in: 2232
You could print out "23" as a string:
Code:
printf(%d%s%d \n", mynumber, string23, mynumber);
or you could make 23 into a digit:
Code:
int twenty3 =23;
printf("%d%d%d", mynumber, twenty3, mynumber);
In either case, you could use a for loop, very much like your PHP example.
Do you want to generate these combinations, or simply check them that they have this feature?