Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
XEPBAN
//fpc 3.0.0 program XEPBAN; const fi='XEPBAN.INP'; fo='XEPBAN.OUT'; max=200; var x: array[1..max] of string; n,i: byte; procedure xuly; var Begin for i:=1 to n do X[i]:=i; Repeat for i:=1 to n do write(x[i],' '); writeln; i:=n-1; while (i>0) and (x[i]>x[i+1]) do Dec(i); if i>0 then begin k:=n; while x[k]<x[i] do Dec(k); swap(x[k],x[i]); a:= i+1; b:=n; while a<b do begin swap(x[a],x[b]); inc(a); dec(b); end; end; Until i=0; End; BEGIN assign(input,fi); reset(input); assign(output,fo); rewrite(output); readln(n); for i:=1 to n do readln(x[i]); xuly; close(input); close(ouput); END.
run
|
edit
|
history
|
help
0
Calculatrice 1.0
Луноход-4
Урок 3, задача 5 Задача 1478. Урок в неделе
For2
Rafli
testMatrice0.1
Looping (odd no.)
Task
вывод номера символа на экран
http://rextester.com/UVQV94798