int main () { char c[100]; citire(c); verificare(c); return 0; }
int main () { FILE *f; f=fopen("permutari.in", "r"); fscanf(f, "%d", &N); fclose(f); FILE *g; g=fopen("permutari.out", "w"); total=1; for (i=2; i<=N; i++) total*=i; for (i=1; i<=N; i++) {gen[i]=i; fprintf(g, "%d ", i);} fprintf(g, "\n"); for (k=2; k<=total; k++) { do incrementare(); while (!verificare()); for (i=1; i<=N; i++) fprintf(g, "%d ", gen[i]); fprintf(g, "\n"); } fclose(g); return 0; }
void joc() { introducere(n); afisare(); verificare(n); }