Hello, I would like to generate all the possible combinations of the number "00000000" to "99999999" and write them to a file, for this I have made this code, but it does not work and no error is thrown. Could you help me more to find the problem please? Maybe I do it the wrong way. Thank you ^^
#include <stdio.h>
#include <stdlib.h>
int main(void) {
FILE* fp;
fp = fopen("numlist.txt", "a");
for (int a = 0; a < 10; a++) {
for (int b = 0; b < 10; b++) {
for (int c = 0; c < 10; c++) {
for (int d = 0; d < 10; d++) {
for (int d = 0; d < 10; d++) {
for (int e = 0; e < 10; e++) {
for (int f = 0; f < 10; f++) {
for (int g = 0; g < 10; g++) {
for (int h; h < 10; h++) {
fprintf(fp, "%d%d%d%d%d%d%d%d;", a, b, c, d, e, f, g, h);
}
}
}
}
}
}
}
}
}
return EXIT_SUCCESS;
}