Created
April 28, 2013 17:03
-
-
Save abreslav/5477507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure permutations(var a: array[1..N] of Integer; pos: Integer); | |
begin | |
if pos >= N then begin | |
for i := 1 to N do | |
Write(a[i], ' '); | |
WriteLn; | |
end; | |
for i := 1 to N do begin | |
a[i] := i; | |
permutations(a, pos + 1); | |
end; | |
end; | |
begin | |
// Как исправить процедуру и как ее вызвать, чтобы она вывела все перестановки чисел от 1 до N? | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment