1 PROGRAM PERMUTATIONEN(INPUT,OUTPUT);
4 C: ARRAY[1..10] OF INTEGER;
8 PROCEDURE WRITEPERMUTATION;
12 FOR I := 1 TO N DO WRITE( C[I] :3);
14 END (* WRITEPERMUTATION *);
18 PROCEDURE PERM(K: INTEGER);
21 IF K=1 THEN WRITEPERMUTATION ELSE
24 BEGIN H := C[I]; C[I] := C[K]; C[K] := H;
26 H := C[I]; C[I] := C[K]; C[K] := H
34 WRITE("P E R M U T A T I O N E N DER ORDNUNG");
37 FOR I := 1 TO N DO C[I] := I;