#2
by みけCAT » 3年前
そのまんま埋め込むのが簡単でしょう。
コード:
#include <stdio.h>
int main(void) {
static const char* data[] = {
"1234", "1243", "1324", "1342", "1432", "1423",
"2134", "2143", "2314", "2341", "2431", "2413",
"3214", "3241", "3124", "3142", "3412", "3421",
"4231", "4213", "4321", "4312", "4132", "4123",
NULL
};
const char** p;
for (p = data; *p != NULL; p++) {
puts(*p);
}
return 0;
}
そのまんま埋め込むのが簡単でしょう。
[code]
#include <stdio.h>
int main(void) {
static const char* data[] = {
"1234", "1243", "1324", "1342", "1432", "1423",
"2134", "2143", "2314", "2341", "2431", "2413",
"3214", "3241", "3124", "3142", "3412", "3421",
"4231", "4213", "4321", "4312", "4132", "4123",
NULL
};
const char** p;
for (p = data; *p != NULL; p++) {
puts(*p);
}
return 0;
}
[/code]