#include -- Das sollte man besser mathematisch lösen, siehe 10tox char c[20]; int basis=10; int len=2; int max; int stelle; int i; int main() { for (i=0;i < len;c[i++]='0') ; max=len; while (max >= 0) { stelle=max--; for (i=0;i < basis;i++) { c[stelle]=i+'0'; printf("%s\n",c); } } }