7 Vector = array [1..MAX] of integer;
\r
10 (*****************************************************)
\r
12 procedure visualiza(var v: Vector; titulo: String);
\r
20 for i := 1 to MAX do
\r
21 writeln('Numero ', i, ': ', v[i]);
\r
25 (*****************************************************)
\r
27 procedure leerDatos(var v: Vector);
\r
31 i, k, code: integer;
\r
35 assign(f, 'datos.txt');
\r
38 while (not eof(f)) and (i <= MAX) do begin
\r
41 if code <> 0 then begin
\r
42 Writeln('Error en la posici¢n: ', Code);
\r
49 visualiza(v, 'Datos Originales');
\r
52 (*****************************************************)
\r
54 procedure ordenarDecreciente(var v: Vector);
\r
60 for i := 1 to MAX do
\r
61 for j := i + 1 to MAX do
\r
62 if v[i] < v[j] then begin
\r
67 end; { ordenarDecreciente }
\r
69 (*****************************************************)
\r
76 ordenarDecreciente(v);
\r
77 visualiza(v, 'Datos Ordenados');
\r